Git Product home page Git Product logo

Comments (5)

kevin-xiaoxin avatar kevin-xiaoxin commented on August 20, 2024

I have processed the omniglot into noLatin.json as the requirement, however, it raises this issue.

Traceback (most recent call last): File "train.py", line 108, in assert params.num_classes >= 1597, 'class number need to be larger than max label id in base class' AssertionError: class number need to be larger than max label id in base class

The form of Json is "{label_names": ["Alphabet_of_the_Magi/character01","Alphabet_of_the_Magi/character02",..."ULOG/character26"],"image_names": ["E:/Project/CloserLookFewShot-master/filelists/omniglot/images/Alphabet_of_the_Magi/character01/0709_19.png",...,"E:/Project/CloserLookFewShot-master/filelists/omniglot/images/ULOG/character26/1623_15.png"],"image_labels": [0,...,1596]}

When you train the model, you need to specify num_classes, for example python ./train.py --model Conv4 --method baseline --num_classes 1597

from closerlookfewshot.

wenbohuang1002 avatar wenbohuang1002 commented on August 20, 2024

I have processed the omniglot into noLatin.json as the requirement, however, it raises this issue.
Traceback (most recent call last): File "train.py", line 108, in assert params.num_classes >= 1597, 'class number need to be larger than max label id in base class' AssertionError: class number need to be larger than max label id in base class
The form of Json is "{label_names": ["Alphabet_of_the_Magi/character01","Alphabet_of_the_Magi/character02",..."ULOG/character26"],"image_names": ["E:/Project/CloserLookFewShot-master/filelists/omniglot/images/Alphabet_of_the_Magi/character01/0709_19.png",...,"E:/Project/CloserLookFewShot-master/filelists/omniglot/images/ULOG/character26/1623_15.png"],"image_labels": [0,...,1596]}

When you train the model, you need to specify num_classes, for example python ./train.py --model Conv4 --method baseline --num_classes 1597

Thank you for the helpful answer, however, I have added the --num_classes 1597 or defined the num_classes = 1597 before reporting this issue. I think there may have another reason.

from closerlookfewshot.

kevin-xiaoxin avatar kevin-xiaoxin commented on August 20, 2024

Thank you for the helpful answer, however, I have added the --num_classes 1597 or defined the unm_classes = 1597 before reporting this issue. I think there may have another reason.

Have you ever tried the cross domain tasks(miniImagenet-CUB) in table 3? I have met the problem of lower accuracy 52% in baseline using ResNet18. And I didn't get the reason of this. If you have done this research, can you tell me what the problem is? Thank you very much!

from closerlookfewshot.

wenbohuang1002 avatar wenbohuang1002 commented on August 20, 2024

Thank you for the helpful answer, however, I have added the --num_classes 1597 or defined the unm_classes = 1597 before reporting this issue. I think there may have another reason.

Have you ever tried the cross domain tasks(miniImagenet-CUB) in table 3? I have met the problem of lower accuracy 52% in baseline using ResNet18. And I didn't get the reason of this. If you have done this research, can you tell me what the problem is? Thank you very much!

Sorry, I do not have the imagenent dataset on my PC. Therefore, I tried cross_char instead but it can not run.

from closerlookfewshot.

yyou22 avatar yyou22 commented on August 20, 2024

Hello, were you able to resolve the issue of running cross_char? We were able to run cross_char with python ./train.py --dataset cross_char --method baseline++ --num_classes 1597, however the baseline++ accuracy (80%) is lower than baseline (85%) for omniglot -> EMNIST. Please let us know if you also have this issue, thank you so much.

from closerlookfewshot.

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.