Comments (4)
This is a known issue that at the time of writing this code, I am not sure how to solve this appropriately. TensorFlow (Keras) models need to be built before being used, but to build the model, one needs the input shape of the dataset. The DataSource
class then needs to include an input_shape() function to return the input shape of the dataset. The datasource
instance, however, doesn't need to load any data when initializing itself. Conceptually, one can detach all the data loading code from init()
, and put them in a separate function.
from plato.
Similar things happen when using yolov5 in Pytorch. The input shape of a model should be better defined in a model configuration, instead of being dynamicly adjusted based on the given dataset.
It is a little bit strange to see that the server loads coco128 dataset (should be kept at the client side):
[INFO][03:15:52]: [Server #8] Loading a pre-trained model.
[INFO][03:15:52]: [Server #8] Loading a model from /home/data/pretrained/yolov5.pth.
[INFO][03:15:52]: Data source: YOLO
[INFO][03:15:52]: Downloading the YOLO dataset. This may take a while.
[INFO][03:15:52]: Downloading https://github.com/ultralytics/yolov5/releases/download/v1.0/coco128.zip.
[███[INFO][03:15:52]: Extracting ./data/coco128.zip to ./data.█████████████████████████████████████ ] 99.24%
[████████████████████████████████████████████████████████████████████████████████████████████████████] 100.00%
from plato.
It makes sense to say that the model should somehow provide the input shape, however since we are using vanilla models from PyTorch (nn.Model
), MindSpore (nn.cell
), and TensorFlow/Keras, I am not sure how this can be obtained. One possibility, which is a bit less elegant, is to explicitly add the data shape into the configuration file.
The Yolov5 + coco128 work is done jointly with Qintao. Perhaps he can take a look at this issue -- assigned.
from plato.
Perhaps define a configuration to solve this issue.
from plato.
Related Issues (20)
- [RFC] Question about where to implement attack.
- [BUG] No config.yml file found HOT 1
- non iid data HOT 2
- objective function
- [BUG] A Typo in KNOT Example
- Query about reproducing the result of Port paper? HOT 1
- [BUG]
- [BUG] in HeteroFL, the accuracy of the global model does not change HOT 2
- Issue about FedAsync HOT 3
- Port implementation
- Repeatedly running the example in ./examples are not guaranteed to give the same result every time. HOT 1
- [BUG] `consistent_clients` config not works in `sampler: mixed_label_quantity_noniid` HOT 1
- 攻击代码实现 HOT 1
- FedNova HOT 1
- [BUG] no Report class
- Query on Port
- gradient_leakage_attacks - training
- [BUG]can not find paper for MistNet HOT 1
- AttributeError: 'Config' object has no attribute 'parameters'
- [BUG] ModuleNotFoundError: No module named 'plato.algorithms.tensorflow'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from plato.