Code Monkey home page Code Monkey logo

Comments (7)

ssbotelh avatar ssbotelh commented on August 14, 2024

Hi @yashjain-99, yes, we should be adding a full tutorial on transfer learning for image classification soon.
But just for clarification, the json files available under resources contain network descriptions only, not model parameters. For transfer learning, you'd also need the corresponding h5 file from Keras/Tensorflow, which contains the actual model parameters. We will provide that soon as well.

However, I'm curious by what you meant by "it didn't provide any results or return any errors". Were you able to run rmldnn? If so, could you show your config file and what you got as output? Thanks

from rmldnn.

yashjain-99 avatar yashjain-99 commented on August 14, 2024

About issue when using same network as given in documentation of MNIST classification but with modification(Attached NN).
rmldnn docker image version: rmldnn latest
Configuration file: config_training.json and config_test.json(attached)
input data file: https://www.kaggle.com/datasets/gpiosenka/100-bird-species
Command run to reproduce the error: sudo docker run -u $(id -u):$(id -g) -v ${PWD}:/home/ubuntu -w /home/ubuntu --rm
rocketml/rmldnn:latest rmldnn --config=config_training.json
Expected behavior: It should have ran and should have given low accuracy as model is not complex enough for this large data.
Screenshots: Attached
Desktop: Ubuntu(22.04) , Docker(20.10.12)
All files available in zip below. Kindly refer that and for dataset use above mentioned kaggle link.
Files.zip
If you require any additional information or files, please let me know.

from rmldnn.

RML-Admin avatar RML-Admin commented on August 14, 2024

@yashjain-99 could you try the following configuration file? Please note these changes:

  1. resize in data --> transforms to match the input layer in the network
  2. NLL loss function because this is a classification problem. Dice loss in your current configuration works for image segmentation problems.
{
    "neural_network": {
        "outfile": "out.txt",
        "num_epochs": 40,
        "layers": "./net.json",
        "checkpoints": {
            "save": "./model/",
            "interval": 20
        },
        "data": {
            "input_type": "images",
            "target_type": "labels",
            "input_path":      "./train",
            "test_input_path": "./valid",
            "batch_size": 8,
            "grayscale": false,
            "preload": false,
            "transforms": [
                { "resize": [224, 224] }
            ]
        },
        "optimizer": {
            "type": "Adam",
            "learning_rate": 1e-4
        },
        "loss": {
            "function": "NLL"
        }
    }
}

from rmldnn.

yashjain-99 avatar yashjain-99 commented on August 14, 2024

Yes, it worked. I will provide the accuracy when the training is finished because it is taking far too long, even though I reduced the number of labels from 400 to 100.
Thanks for help. @ssbotelh @adavanisanti
screenshot attached:
Screenshot from 2022-05-18 01-38-57

from rmldnn.

yashjain-99 avatar yashjain-99 commented on August 14, 2024

An error came up during evaluation: Target -1 out of bound.(Screenshots attached)
Screenshot from 2022-05-18 01-53-54
Screenshot from 2022-05-18 01-54-48
Screenshot from 2022-05-18 02-33-06

from rmldnn.

ssbotelh avatar ssbotelh commented on August 14, 2024

Hi @yashjain-99, this error is caused by a mistake in the dataset. Notice how the directory
BLACK & YELLOW BROADBILL has an extra space in the training set, but not in the test or validation sets. As a result, test samples from that category will not have a matching label, thus the invalid -1 target label.

Please rename this directory in the training set by removing the extra space, and retry your run. In future releases, I'll make sure this error happens early and with a clear error message.

from rmldnn.

yashjain-99 avatar yashjain-99 commented on August 14, 2024

Yes thanks a lot @ssbotelh , It is working all fine now.

from rmldnn.

Related Issues (4)

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.