0
私はtensorflowタイムラインモジュールを使用してGPU/CPU時間の統計情報を取得しようとしていますが、Tensorflow:「モジュール」オブジェクトが属性を持っていない「RunMetaData」
run_metadata = tf.RunMetaData()
には、エラーを次のようなります。
AttributeError: 'module' object has no attribute 'RunMetaData'
私は0.10.0rc0
バージョンを使用しています。 実際には関数定義を見るにはtensorflow/python/client/timeline.py
に行きますが、そこには存在しませんでした。 P.S:私はTensorFlow 0.12.0以降をインストールするために必要なfrom tensorflow.python.client import timeline
[コードスニペット]
cross_entropy = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(y_conv, y_))
train_step = tf.train.AdamOptimizer(1e-4).minimize(cross_entropy)
correct_prediction = tf.equal(tf.argmax(y_conv,1), tf.argmax(y_,1))
accuracy = tf.reduce_mean(tf.cast(correct_prediction, tf.float32))
run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE)
run_metadata = tf.RunOutputs()
sess.run(tf.initialize_all_variables())
[ERROR SNIPPET]
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-1-0dd6887f3319> in <module>()
90
91 run_options = tf.RunOptions(trace_level=tf.RunOptions.FULL_TRACE)
---> 92 run_metadata = tf.RunMetaData()
93 sess.run(tf.initialize_all_variables())
94
AttributeError: 'module' object has no attribute 'RunMetaData'
いずれの場合でも直ちに試してみると、もっと新しいバージョン(0.12.1)になると思います。それが助けにならない、または実行できない場合は、このエラーの原因となるコードスニペットを投稿できますか? –
スニペットで質問を更新しました。私は今バージョンを更新できません。それはちょっとした問題です。 –
これは存在しない関数を呼び出すTensorFlowコンポーネントだと思っていました。 'RunMetadata'(小文字の" d ")を意味するだけですか? –