whdy / fedavg Goto Github PK
View Code? Open in Web Editor NEWImplement FedAvg algorithm based on Tensorflow
Implement FedAvg algorithm based on Tensorflow
想请问一下,pytorch版本中,getData.py 只写了获取mnist数据集而没有cifar数据集,请问获取cifar具体过程是不是和TensorFlow版一致,还是得进行修改呢
Hi,
I created a virtual environment as your suggestion. But I got the following error:
Extracting ./data/MNIST\train-images-idx3-ubyte.gz
Extracting ./data/MNIST\train-labels-idx1-ubyte.gz
Extracting ./data/MNIST\t10k-images-idx3-ubyte.gz
Extracting ./data/MNIST\t10k-labels-idx1-ubyte.gz
communicate round 0
0%| | 0/10 [00:00<?, ?it/s]
Traceback (most recent call last):
File "E:/OneDrive - University of Otago/research/FedAvg/server.py", line 87, in <module>
local_vars = myClients.ClientUpdate(client, global_vars)
File "E:\OneDrive - University of Otago\research\FedAvg\clients.py", line 112, in ClientUpdate
train_data, train_label = self.clientsSet[client].next_batch(self.B)
File "E:\OneDrive - University of Otago\research\FedAvg\clients.py", line 38, in next_batch
return self.train_dataset[start:end], self.train_label[start:end]
TypeError: 'NoneType' object is not subscriptable
Do you know the reason? Thank you very much for your great help.
为什么getData那里那么复杂?没太看懂,为什么不直接按普通的读数据方式呢?有什么特别的地方吗,求教!
dataset_train = datasets.MNIST('../data/mnist/', train=True, download=True,
transform=transforms.Compose([
transforms.ToTensor(),
transforms.Normalize((0.1307,), (0.3081,))
]))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.