2017-12-26 4 views
0

TensorFlow 1.3.1では、IsFiniteScalarF32テストがエラー: "expected:false vs actual:true"で失敗しています。ライン100 https://github.com/tensorflow/tensorflow/blob/v1.3.1/tensorflow/compiler/xla/tests/array_elementwise_ops_test.cc#L100で、コマンドのbazel test -c opt //tensorflow/compiler/xla/tests:array_elementwise_ops_test_cpu_parallelテンソルフロー/コンパイラ/ xla/tests:array_elementwise_ops_test_cpu_parallel ppc64leでのテストエラー

現在、私は障害のデバッグ、およびauto result = builder.IsFinite(builder.ConstantR0<float>(NAN));

の出力を確認したいのですが、次のエラーを取得し、std::cout << "value is ***** \n" << result;を使用して出力を表示しようとしました:

tensorflow/compiler/xla/tests/array_elementwise_ops_test.cc:67:13: error: cannot bind 'std::basic_ostream<char>' lvalue to 'std::basic_ostream<char>&&' 
    std::cout << "value is ***** \n" << result; 
      ^
In file included from /usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../include/c++/4.8.5/iostream:39:0, 
       from tensorflow/compiler/xla/tests/array_elementwise_ops_test.cc:21: 
/usr/lib/gcc/ppc64le-redhat-linux/4.8.5/../../../../include/c++/4.8.5/ostream:602:5: error: initializing argument 1 of 'std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = xla::ComputationDataHandle]' 
    operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x) 

変数resultの値を出力するにはどうすればよいですか?

答えて

0

のタイプは、hereと定義されたプロトコルバッファです。 プロトコルバッファーとしてoperator<<が定義されていないため、表示されているエラーがあります。このようなエラーの説明を次に示します。std::vector : cannot bind 'std::ostream {aka std::basic_ostream<char>}' lvalue to 'std::basic_ostream<char>&&'

cout << result.DebugString()を使用すると、プロトコルバッファの値を印刷できます。

これは、XLA計算グラフで計算される値の単なるハンドルなので、値は多少の乱数になります。

関連する問題