tensorflow: Unable to get FLOPs on model with tf.nn.bidirectional_dynamic_rnn

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Debian/Sid
  • TensorFlow installed from (source or binary): binary, tensorflow-gpu
  • TensorFlow version (use command below): 1.5.0
  • Python version: 2.7
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: CUDA 9.0/CuDNN v7
  • GPU model and memory: GTX1080, 8GB

Running the model under benchmark_model, I’m unable to get any FLOPs value, and there are several strange pieces in the output:

2018-02-26 14:37:55.738267: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/fw/fw/while/Switch
2018-02-26 14:37:55.738500: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/bw/bw/while/Switch_1
2018-02-26 14:37:55.738507: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/bw/bw/while/Switch
2018-02-26 14:37:55.739153: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/fw/fw/while/Switch_3
2018-02-26 14:37:55.739165: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/fw/fw/while/Switch_2
2018-02-26 14:37:55.739171: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/fw/fw/while/Switch_4
2018-02-26 14:37:55.739300: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/bw/bw/while/Switch_3
2018-02-26 14:37:55.739307: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/bw/bw/while/Switch_4
2018-02-26 14:37:55.739311: W tensorflow/core/util/stat_summarizer.cc:78] Output tensor changed between runs for 'bidirectional_rnn/bw/bw/while/Switch_2

And

2018-02-26 14:38:33.921383: E tensorflow/tools/benchmark/benchmark_model.cc:579] FLOPs calculation failed with Internal: Retval[4] has already been set.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

@petewarden do you have experience with dynamic rnn and benchmark_model?