Comments (8)
You should most likely make noise_dim equal to 0 with the command line flags (--noise_dim=0
).
The error occurs because as you can see in this line of code : if self.noise_dim[0] == 0:
noise_dim gets indexed. However the default value for noise_dim (see TRAINING.MD for this) is None, which cannot be indexed. Arrays, lists, etc. can be.
It's a slight inconvenience in the code which could be avoided by making the default value 0.
from sgan.
I don't want to
make noise_dim equal to 0 with the command line flags
as @angeliand pointed out.
I want to add noise while training, as @agrimgupta92 did while training his models.
I used his script print_args.py
and noticed how he consistently trained with noise_dim = 8
. I've tried to add noise with --noise_dim 8
but that resulted in this error:
Traceback (most recent call last):
File "scripts/train.py", line 643, in <module>
main(args)
File "scripts/train.py", line 271, in main
optimizer_d)
File "scripts/train.py", line 399, in discriminator_step
generator_out = generator(obs_traj, obs_traj_rel, seq_start_end)
File "anaconda3/envs/progetto/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
result = self.forward(*input, **kwargs)
File "sgan/sgan/models.py", line 587, in forward
seq_start_end,
File "anaconda3/envs/progetto/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 175, in forward
self.check_forward_args(input, hx, batch_sizes)
File "anaconda3/envs/progetto/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 152, in check_forward_args
'Expected hidden[0] size {}, got {}')
File "anaconda3/envs/progetto/lib/python3.6/site-packages/torch/nn/modules/rnn.py", line 148, in check_hidden_size
raise RuntimeError(msg.format(expected_hidden_size, tuple(hx.size())))
- Is there something that I'm missing or it can be considered a bug?
- Training with
noise_dim = 0
leads to a model trained on real data only (with no added noise at all) ?
Thanks.
from sgan.
TypeError: 'NoneType' object is not subscriptable
from sgan.
Why was this issue closed, without fixing the code?
I ran into the same issue 4 months on.
from sgan.
@w00zie Hi, have you solved this problem? I also want to train with non-zero noise-dim, thanks in advance!
from sgan.
@w00zie seems that I could run the code now, just change (8,0) to 8
from sgan.
@mingbocui you mean --noise_dim 8
or --noise_dim (8,0)
?
Thank you
from sgan.
@w00zie just use --noise_dim 8
from sgan.
Related Issues (20)
- How do I align the basic facts with the generated data in each iteration?
- Dataset preprocessing HOT 1
- Meaning of Datasets 'val'
- Save final model from checkpoint file
- ValueError: could not broadcast input array from shape (2,15) into shape (2,16) HOT 3
- KeyError: 'g_state' HOT 1
- How to get the predicted trajectory of target pedestrian?
- Can you provide the super parameters in the code? HOT 2
- EVALUATION PROBLEM HOT 1
- Possible problem with make_mlp function
- N
- N in SGAN-kVP-N
- How to make from ETH raw data to ETH pickle file?
- a porblem need to be solve HOT 11
- What version of torch and cuda should I use on windows
- how to run social gan in my project? tks
- How to test my own data?
- A problem in trajectories.py HOT 1
- tar: Error opening archive: Unrecognized archive format
- The meaning of each column in the dataset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sgan.