agrimgupta92 / sgan

Code for "Social GAN: Socially Acceptable Trajectories with Generative Adversarial Networks", Gupta et al, CVPR 2018
MIT License
813 stars 261 forks source link

During training: "ValueError: could not convert string to float" because of delimiters #52

Open agoodge opened 5 years ago

agoodge commented 5 years ago

"ValueError: could not convert string to float: '0.0\t1.0\t11.238836854\t3.746958' "

As you can see, the delimiters are set to \t and so the data becomes a string which cannot be converted to float. Could you recommend how this should be working instead?

gwiplot commented 5 years ago

change dlim to '\t' in the error part

haishi-ai commented 5 years ago

if you use delimiters with tab, set --delim="tab".

python3 scripts/train.py --delim="tab"

doesn't work --delim='\t' (default)

Hahaemmm commented 4 years ago

if you use delimiters with tab, set --delim="tab".

python3 scripts/train.py --delim="tab"

when i use ‘--delim="tab"’ ,it presents the following problem:

Traceback (most recent call last): File "scripts/train.py", line 582, in main(args) File "scripts/train.py", line 150, in main batch_norm=args.batch_norm) File "/home/caixianchen/sgan/sgan/models.py", line 425, in init if self.noise_dim[0] == 0: TypeError: 'NoneType' object is not subscriptable

haishi-ai commented 4 years ago

if self.noise_dim[0] == 0: TypeError: 'NoneType' object is not subscriptable

this is another problem.

i add the following option.

--noise_dim=0

NoneType(defalut value) is not tupple. doesnt work.. defalut value is not correct. unbelievable.

[total command]

$ python scripts/train.py --delim="tab" --noise_dim=0
Yinan-x-Zhang commented 2 years ago

I think is this!

line = line.strip().split(delim)

line = re.split('\s+',line.strip())