Giter Club home page Giter Club logo

Comments (7)

junyongyou avatar junyongyou commented on August 20, 2024

My current workaround solution is to use multiple images in a batch. However, it might be better to figure out how to solve the single image issue.

In addition, the model produces a softmax output with 10 element for a single image, because I am using the AVA model. How can we compute a single score for an image? Thank you.

from tanet.

woshidandan avatar woshidandan commented on August 20, 2024
  1. I have never encountered such a problem before ,you may refine the function of "validate(opt, model=model, loader=dataloader_test……" when bs=1,to see if you can solve this problem,see issue 8.
  2. use the function of "def get_score(opt, y_pred)" in my code to obtain a score.

from tanet.

junyongyou avatar junyongyou commented on August 20, 2024
  1. I have never encountered such a problem before ,you may refine the function of "validate(opt, model=model, loader=dataloader_test……" when bs=1,to see if you can solve this problem,see issue 8.

    1. use the function of "def get_score(opt, y_pred)" in my code to obtain a score.

I got it, thanks a lot.

from tanet.

justlike-prog avatar justlike-prog commented on August 20, 2024

@junyongyou hi could you solve this issue without using the dataloader? For now I am doing

bn7 = nn.BatchNorm1d(q.shape[0])
bn7.eval()

because it seems that the problem is that the BatchNorm1d is in training mode, although we set the whole model to eval. I am sure there is nicer solution. I guess the BatchNorm should be created when creating the TargetNet and then the forward pass just calls it.

from tanet.

justlike-prog avatar justlike-prog commented on August 20, 2024

@woshidandan Ok my solution doesn't work because it throws some wrong predictions. I would need the single image inference without dataloader for converting the model to onnx. Any ideas?

from tanet.

junyongyou avatar junyongyou commented on August 20, 2024

There are some sub-models that are not in eval mode even the whole model is set to eval. Thus, I don't know how to solve the problem.

from tanet.

chenminupup avatar chenminupup commented on August 20, 2024

@junyongyou 关于single image inference,想问下你这边解决了吗?

from tanet.

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.