kentsommer / pytorch-value-iteration-networks Goto Github PK
View Code? Open in Web Editor NEWPytorch implementation of Value Iteration Networks (NIPS 2016 best paper)
License: BSD 3-Clause "New" or "Revised" License
Pytorch implementation of Value Iteration Networks (NIPS 2016 best paper)
License: BSD 3-Clause "New" or "Revised" License
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
Hello,I am a fresh learner of RL, so I am confused about how to form the input.What is X,S1,S2,label?
Hello,
I was wondering how you generated the prebuilt datasets that are downloaded when running download_weights_and_datasets.sh, i.e. what were the max_obs and max_obs_size parameters?
Did you follow this file in the original repo?
https://github.com/avivt/VIN/blob/master/scripts/make_data_gridworld_nips.m
Thanks,
Emilio
Hello!
I have a little doubt.Does the rollout accuracy indicate the success rate? If so, why is it lower than the prediction accuracy? In the Aviv's implementation, the success rate of the 8x8 grid world was as high as 99.6%. Why is the success rate in your experiment relatively low?
Thanks!
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?
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?
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?
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])
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!
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.