Giter Club home page Giter Club logo

pytorch_squeezenet's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pytorch_squeezenet's Issues

code error in main.py


NameError Traceback (most recent call last)
~\pytorch_Squeezenet-master\main.py in
204 fig2, ax2 = plt.subplots()
205 train_acc, val_acc = list(), list()
--> 206 for i in xrange(1,args.epoch+1):
207 train_acc.append(train(i))
208 val_acc.append(val())

NameError: name 'xrange' is not defined

RuntimeError: shape '[32, 10]' is invalid for input of size 160

Sorry to disturb. I tried to run squeezenet using pytorch on GPU. And I got this error at the end of Epoch 1.
Train Epoch: 1 [48992/50000 (98%)] Loss: 1.618558
Train Epoch: 1 [49312/50000 (99%)] Loss: 1.442842
Train Epoch: 1 [49632/50000 (99%)] Loss: 1.601359
Train Epoch: 1 [49952/50000 (100%)] Loss: 1.511631
Traceback (most recent call last):
File "main.py", line 228, in
train_acc.append(train(i))
File "main.py", line 131, in train
scores = scores.view(args.batch_size, args.num_classes)
RuntimeError: shape '[32, 10]' is invalid for input of size 160
Thank you for any suggestion.

RuntimeError: shape '[64, 10]' is invalid for input of size 160

when i use a batch-size of 64, an runtime error occurs when it will almost finish the firt epoch training:
Train Epoch: 1 [49344/50000 (99%)] Loss: 1.619473
Train Epoch: 1 [49984/50000 (100%)] Loss: 1.664685
Traceback (most recent call last):
File "F:/paper_code/pytorch_Squeezenet/main.py", line 208, in
train_acc.append(train(i))
File "F:/paper_code/pytorch_Squeezenet/main.py", line 126, in train
scores = scores.view(args.batch_size, args.num_classes)
RuntimeError: shape '[64, 10]' is invalid for input of size 160

can anyone tell me what i should do?QAQ

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.