loliverhennigh / Convolutional-LSTM-in-Tensorflow

An implementation of convolutional lstms in tensorflow. The code is written in the same style as the basiclstmcell function in tensorflow
Apache License 2.0
420 stars 163 forks source link

running error in main_conv_lstm.py #6

Open amiltonwong opened 7 years ago

amiltonwong commented 7 years ago

Hi, @loliverhennigh ,

I got the following error. Any suggestion?

init network from scratch
WARNING:tensorflow:Passing a `GraphDef` to the SummaryWriter is deprecated. Pass a `Graph` object instead, such as `sess.graph`.
Traceback (most recent call last):
  File "main_conv_lstm.py", line 187, in <module>
    tf.app.run()
  File "/root/anaconda3/envs/tf_1.0/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 44, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "main_conv_lstm.py", line 184, in main
    train()
  File "main_conv_lstm.py", line 146, in train
    dat = generate_bouncing_ball_sample(FLAGS.batch_size, FLAGS.seq_length, 32, FLAGS.num_balls)
  File "main_conv_lstm.py", line 39, in generate_bouncing_ball_sample
    dat[i, :, :, :, :] = b.bounce_vec(32, num_balls, seq_length)
  File "/data/code/Convolutional-LSTM-in-Tensorflow/bouncing_balls.py", line 181, in bounce_vec
    x,v = bounce_n(T,n,r,m);
  File "/data/code/Convolutional-LSTM-in-Tensorflow/bouncing_balls.py", line 40, in bounce_n
    if r==None: r=array([4.0]*n)
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
VV123 commented 6 years ago

change r==None to r is None