StanfordASL/Trajectron

Error when running train.py

lylyjy opened this issue · 1 comments

When I run train.py, it occurs that:

Traceback (most recent call last):
File "/mnt/d/try/Trajectron-master/code/train.py", line 522, in
main()
File "/mnt/d/try/Trajectron-master/code/train.py", line 352, in main
train_loss = stg.train_loss(train_inputs, train_labels, hyperparams['prediction_horizon']) / args.batch_multiplier
File "/mnt/d/try/Trajectron-master/code/model/dyn_stg.py", line 76, in train_loss
if np.any(inputs['traj_lengths'] < mhl + ph):
File "<array_function internals>", line 5, in any
File "/home/lyl/miniconda3/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 2330, in any
return _wrapreduction(a, np.logical_or, 'any', axis, None, out, keepdims=keepdims)
File "/home/lyl/miniconda3/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 85, in _wrapreduction
return reduction(axis=axis, out=out, **passkwargs)
TypeError: any() received an invalid combination of arguments - got (out=NoneType, axis=NoneType, ), but expected one of:

  • ()
  • (name dim, bool keepdim)
    didn't match because some of the keywords were incorrect: out, axis
  • (int dim, bool keepdim)
    didn't match because some of the keywords were incorrect: out, axis

Can you tell me how to solve it?Thanks.

Hi @lylyjy, I think the python version you're using is too new. I used python 3.6.

Also, I highly recommend using our new Trajectron++ codebase for trajectory forecasting work (it's better performing and much nicer to work with from an implementation perspective)!