Models: Trying FIVO and got TypeError: flat_sequence must be a sequence

Created on 25 Oct 2018  路  2Comments  路  Source: tensorflow/models

@dieterichlawson

Describe the problem

I run the code to update the dataset pianoRolls/jsb.pkl with the media:
python data/calculate_pianoroll_mean.py --in_file=$PIANOROLL_DIR/jsb.pkl
Then I run the main code and got an error with the UTF, I fixed it by adding 'rb' when opening the files to load. Now I'm getting this error:

(tf_py3) gissella@huascaran:~/Documents/Research/Semantic/tensorflows_models/research/fivo$ ./bin/run_train.sh
Traceback (most recent call last):
  File "run_fivo.py", line 142, in <module>
    tf.app.run(main)
  File "/home/gissella/anaconda2/envs/tf_py3/lib/python3.5/site-packages/tensorflow/python/platform/app.py", line 125, in run
    _sys.exit(main(argv))
  File "run_fivo.py", line 130, in main
    runners.run_train(FLAGS)
  File "/home/gissella/Documents/Research/Semantic/tensorflows_models/research/fivo/fivo/runners.py", line 232, in run_train
    bound, train_op, global_step = create_graph()
  File "/home/gissella/Documents/Research/Semantic/tensorflows_models/research/fivo/fivo/runners.py", line 222, in create_graph
    bound, loss = create_loss()
  File "/home/gissella/Documents/Research/Semantic/tensorflows_models/research/fivo/fivo/runners.py", line 205, in create_loss
    parallel_iterations=config.parallel_iterations
  File "/home/gissella/Documents/Research/Semantic/tensorflows_models/research/fivo/fivo/bounds.py", line 157, in fivo
    observations = nested.tile_tensors(observations, [1, num_samples])
  File "/home/gissella/Documents/Research/Semantic/tensorflows_models/research/fivo/fivo/nested_utils.py", line 68, in tile_tensors
    return map_nested(tile_fn, tensors)
  File "/home/gissella/Documents/Research/Semantic/tensorflows_models/research/fivo/fivo/nested_utils.py", line 45, in map_nested
    return nest.pack_sequence_as(nested, out)
  File "/home/gissella/anaconda2/envs/tf_py3/lib/python3.5/site-packages/tensorflow/python/util/nest.py", line 306, in pack_sequence_as
    raise TypeError("flat_sequence must be a sequence")
TypeError: flat_sequence must be a sequence

System information

  • What is the top-level directory of the model you are using: FIVO
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux 14.04
  • TensorFlow installed from (source or binary): anaconda virtualenv
  • TensorFlow version (use command below): v1.10.0-0-g656e7a2b34 1.10.0
  • Bazel version (if compiling from source): -
  • CUDA/cuDNN version: running in cpu
  • GPU model and memory: -
  • Exact command to reproduce: ./bin/run_train.sh

Most helpful comment

It seems like it was just a problem of my python and tensorflow installartion. This works in python2.7 and I was using 3.6. It would be great that the README provides some more info about the versions needed.

All 2 comments

It seems like it was just a problem of my python and tensorflow installartion. This works in python2.7 and I was using 3.6. It would be great that the README provides some more info about the versions needed.

so how to deal with this problem ? I

Was this page helpful?
0 / 5 - 0 ratings