Giter Club home page Giter Club logo

Comments (2)

Snailgoo avatar Snailgoo commented on August 17, 2024 1

Do you use token label? If not, maybe you should modify "return_dense=True, mix_token=True" to "return_dense=False, mix_token=False" in

post_layers=None, return_mean=False, return_dense=True, mix_token=True,

when i fixed your pointed codes, it appeared this error :
File "main.py", line 652, in main
train_metrics = train_one_epoch(epoch,
File "main.py", line 786, in train_one_epoch
loss = loss_fn(output, target)
File "C:\Program Files\Anaconda3\envs\yolov5-v4.0\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Program Files\Anaconda3\envs\yolov5-v4.0\lib\site-packages\torch\nn\modules\loss.py", line 961, in forward
return F.cross_entropy(input, target, weight=self.weight,
File "C:\Program Files\Anaconda3\envs\yolov5-v4.0\lib\site-packages\torch\nn\functional.py", line 2468, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "C:\Program Files\Anaconda3\envs\yolov5-v4.0\lib\site-packages\torch\nn\functional.py", line 2264, in nll_loss
ret = torch._C._nn.nll_loss(input, target.long(), weight, _Reduction.get_enum(reduction), ignore_index) # target
RuntimeError: multi-target not supported at C:/w/b/windows/pytorch/aten/src\THCUNN/generic/ClassNLLCriterion.cu:15
i fixed "loss = loss_fn(output, target)" to "loss = loss_fn(output, target.squeeze())", this error still appears
what can i do?

from volo.

yanjk3 avatar yanjk3 commented on August 17, 2024

Do you use token label?
If not, maybe you should modify "return_dense=True, mix_token=True" to "return_dense=False, mix_token=False" in

post_layers=None, return_mean=False, return_dense=True, mix_token=True,

from volo.

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.