Git Product home page Git Product logo

pytorch-value-iteration-networks's People

Contributors

shuishida avatar suryabhupa avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pytorch-value-iteration-networks's Issues

RUN ERROR

when I run 'python train.py --datafile dataset/gridworld_8x8.npz --imsize 8 --lr 0.005 --epochs 30 --k 10 --batch_size 128', it's ok,but again 'python train.py --datafile dataset/gridworld_16x16.npz --imsize 16 --lr 0.002 --epochs 30 --k 20 --batch_size 128' was run, an error occurred as follows:
ni@ubuntu:~/pytorch-value-iteration-networks$ python train.py --datafile dataset/gridworld_16x16.npz --imsize 16 --lr 0.002 --epochs 10 --k 20 --batch_size 128
Traceback (most recent call last):
File "train.py", line 135, in
config.datafile, imsize=config.imsize, train=True, transform=transform)
File "/home/ni/pytorch-value-iteration-networks/dataset/dataset.py", line 22, in init
self._process(file, self.train)
File "/home/ni/pytorch-value-iteration-networks/dataset/dataset.py", line 58, in _process
images = images.astype(np.float32)
MemoryError

Don't understand VIN last step

    slice_s1 = S1.long().expand(config.imsize, 1, config.l_q, q.size(0))
    slice_s1 = slice_s1.permute(3, 2, 1, 0)
    q_out = q.gather(2, slice_s1).squeeze(2)

What does this 3 lines do?

testing accuracy fairly low

I just tried to follow the instructions in the repo, and tested models trained but got a fairly low accuracy. I'm using pyTorch 0.1.12_1. Is there anything I should pay attention to?

Inconsistent tensor sizes when starting training

Hey there.
I'm trying to run

python train.py --datafile dataset/gridworld_8x8.npz --imsize 8 --lr 0.005 --epochs 30 --k 10 --batch_size 128

But I get the following error

Number of Train Samples: 103926
Number of Test Samples: 17434
     Epoch | Train Loss | Train Error | Epoch Time
Traceback (most recent call last):
  File "train.py", line 147, in <module>
    train(net, trainloader, config, criterion, optimizer, use_GPU)
  File "train.py", line 40, in train
    outputs, predictions = net(X, S1, S2, config)
  File "/home/j1k1000o/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 224, in __call__
    result = self.forward(*input, **kwargs)
  File "/media/user_home2/j1k1000o/j1k/VINs/pytorch-value-iteration-networks/model.py", line 44, in forward
    q = F.conv2d(torch.cat([r, v], 1), 
  File "/home/j1k1000o/anaconda3/lib/python3.6/site-packages/torch/autograd/variable.py", line 897, in cat
    return Concat.apply(dim, *iterable)
  File "/home/j1k1000o/anaconda3/lib/python3.6/site-packages/torch/autograd/_functions/tensor.py", line 317, in forward
    return torch.cat(inputs, dim)
RuntimeError: inconsistent tensor sizes at /opt/conda/conda-bld/pytorch_1502009910772/work/torch/lib/THC/generic/THCTensorMath.cu:141

I've executed

./download_weights_and_datasets.sh

as well as

python ./dataset/make_training_data.py

And I'm running it on an Ubuntu 16.04, python 3.6 and with all the requirements installed.

Can you help me out?

Problem of running dataset/make_training_data.py script

Hi

When I tried to run the make_training_data.py script to generate the gridworld.npz file, I got the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'dataset/gridworld_28x28.npz'

And I found that line 101 should be modified as follows:

save_path = "gridworld_{0}x{1}".format(dom_size[0], dom_size[1])

Problem of running the test script

Hello,

I downloaded the data with the .sh downloading script you provided, I also got an nps weights file after training. When I ran the testing command I got the following error:
Traceback (most recent call last):
File "/home/research/DL/VIN/pytorch-value-iteration-networks/test.py", line 158, in
main(config)
File "/home/research/DL/VIN/pytorch-value-iteration-networks/test.py", line 85, in main
_, predictions = vin(X_in, S1_in, S2_in, config)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 357, in call
result = self.forward(*input, **kwargs)
File "/home/research/DL/VIN/pytorch-value-iteration-networks/model.py", line 64, in forward
return logits, self.sm(logits)
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 352, in call
for hook in self._forward_pre_hooks.values():
File "/usr/local/lib/python2.7/dist-packages/torch/nn/modules/module.py", line 398, in getattr
type(self).name, name))
AttributeError: 'Softmax' object has no attribute '_forward_pre_hooks'

Thanks for helping!

KeyError: 'arr_1 is not a file in the archive'

python3 train.py --datafile dataset/gridworld_8x8.npz --imsize 8 --lr 0.005 --epochs 30 --k 10 --batch_size 128
Traceback (most recent call last):
File "train.py", line 135, in
config.datafile, imsize=config.imsize, train=True, transform=transform)
File "/home/user/pytorch/tutorials/valueiterationnetworks/pytorch-value-iteration-networks/dataset/dataset.py", line 22, in init
self._process(file, self.train)
File "/home/user/pytorch/tutorials/valueiterationnetworks/pytorch-value-iteration-networks/dataset/dataset.py", line 49, in _process
S1 = f['arr_1']
File "/home/user/miniconda3/lib/python3.6/site-packages/numpy/lib/npyio.py", line 255, in getitem
raise KeyError("%s is not a file in the archive" % key)
KeyError: 'arr_1 is not a file in the archive'

I got this error, could you please

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.