GithubHelp home page GithubHelp logo

Comments (2)

4F2E4A2E avatar 4F2E4A2E commented on June 8, 2024

I can confirm that this error only appears if is_transform is set to False
If set to true, i got this error:

(pytorch27) learner@learner:meetshah1995/pytorch-semseg$ python train2.py --arch segnet --batch_size 1 --dataset pascal
Traceback (most recent call last):
  File "train2.py", line 105, in <module>
    train(args)
  File "train2.py", line 61, in train
    loss = cross_entropy2d(outputs, labels)
  File "meetshah1995/pytorch-semseg/ptsemseg/loss.py", line 11, in cross_entropy2d
    log_p = log_p[target.view(n, h, w, 1).repeat(1, h, w, c) >= 0]
  File "/home/learner/.conda/envs/pytorch27/lib/python2.7/site-packages/torch/autograd/variable.py", line 471, in view
    return View(*sizes)(self)
  File "/home/learner/.conda/envs/pytorch27/lib/python2.7/site-packages/torch/autograd/_functions/tensor.py", line 98, in forward
    result = i.view(*self.sizes)
RuntimeError: size '[1 x 256 x 256 x 1]' is invalid for input of with 196608 elements at /b/wheel/pytorch-src/torch/lib/TH/THStorage.c:59

I am just trying to get it running with the VOC2012 dataset. All dataset files are double checked.
Is there a way to get it running?

I also had to adapt the dependencies (requirements.txt) to:

matplotlib==2.0.0
numpy==1.13.1
scipy==0.19.0
torch
torchvision
tqdm
visdom
certifi

from pytorch-semseg.

meetps avatar meetps commented on June 8, 2024

No issue in present master.

from pytorch-semseg.

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.