Giter VIP home page Giter VIP logo

create web directory ./checkpoints/target/web... End of epoch 1 / 40 Time Taken: 898 sec Traceback (most recent call last): File "train_pose2vid.py", line 127, in <module> main() File "train_pose2vid.py", line 84, in main errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()} File "train_pose2vid.py", line 84, in <dictcomp> errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()} IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number about everybodydancenow_reproduce_pytorch HOT 2 OPEN

yanx27 avatar yanx27 commented on June 3, 2024
create web directory ./checkpoints/target/web... End of epoch 1 / 40 Time Taken: 898 sec Traceback (most recent call last): File "train_pose2vid.py", line 127, in main() File "train_pose2vid.py", line 84, in main errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()} File "train_pose2vid.py", line 84, in errors = {k: v.data[0] if not isinstance(v, int) else v for k, v in loss_dict.items()} IndexError: invalid index of a 0-dim tensor. Use tensor.item() to convert a 0-dim tensor to a Python number

from everybodydancenow_reproduce_pytorch.

Comments (2)

aiXander avatar aiXander commented on June 3, 2024

Did anybody find the quick-fix for this? Having the same error

from everybodydancenow_reproduce_pytorch.

aiXander avatar aiXander commented on June 3, 2024

Ait so aparantly, batch_size is set to 1 in src/config/train_opt.py, therefore v.data[0] does not work and you have to:

  • Either set the batch_size to a value different from 1
  • or use v.item()

from everybodydancenow_reproduce_pytorch.

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.