Giter Site home page Giter Site logo

dsfd's People

Contributors

roycemao avatar

Stargazers

 avatar

Watchers

 avatar

dsfd's Issues

When i run the train.py

Could you tell me where the problem is?

Traceback (most recent call last):
File "train.py", line 271, in
train(argments)
File "train.py", line 135, in train
loss = criterion(out, targets)
File "/home/cqupt/.conda/envs/w_py36/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in call
result = self.forward(*input, **kwargs)
File "/home/cqupt/.conda/envs/w_py36/DSFD/layers/my_loss.py", line 214, in forward
loss_loc, loss_cls = self.loss_compute(predictions, targets)
File "/home/cqupt/.conda/envs/w_py36/DSFD/layers/my_loss.py", line 190, in loss_compute
p_t_log = - F.cross_entropy(cls_preds_pure, cls_batch[pos_neg_cls], size_average=False)
File "/home/cqupt/.conda/envs/w_py36/lib/python3.6/site-packages/torch/nn/functional.py", line 1970, in cross_entropy
return nll_loss(log_softmax(input, 1), target, weight, None, ignore_index, None, reduction)
File "/home/cqupt/.conda/envs/w_py36/lib/python3.6/site-packages/torch/nn/functional.py", line 1790, in nll_loss
ret = torch._C._nn.nll_loss(input, target, weight, _Reduction.get_enum(reduction), ignore_index)
RuntimeError: Expected object of scalar type Long but got scalar type Float for argument #2 'target'

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.