Git Product home page Git Product logo

Comments (4)

baochunli avatar baochunli commented on August 31, 2024

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.

XinYao1994 avatar XinYao1994 commented on August 31, 2024

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.

baochunli avatar baochunli commented on August 31, 2024

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.

TrackerLB avatar TrackerLB commented on August 31, 2024

Perhaps define a configuration to solve this issue.

from plato.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.