
[code]

    Traceback (most recent call last):
      File "/Users/oshikawaakinobu/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 458, in _apply_op_helper
        raise TypeError()  # All types should match.
    TypeError
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "run_mnist.py", line 235, in <module>
        main(parser.parse_args())
      File "run_mnist.py", line 137, in main
        pred = deep_mnist(args, x, train_phase)
      File "/Users/oshikawaakinobu/mnist_model.py", line 35, in deep_mnist
        cv1 = hn_lite.conv2d(x, nf, fs, padding='SAME', n_rings=nr, name='1')
      File "/Users/oshikawaakinobu/harmonic_network_lite.py", line 38, in conv2d
        name=name)
      File "/Users/oshikawaakinobu/harmonic_network_ops.py", line 56, in h_conv
        new_shape = tf.concat(axis=0, values=[Ysh[:3],[max_order+1,2],[Ysh[3]/(2*(max_order+1))]])
      File "/Users/oshikawaakinobu/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1113, in concat
        return gen_array_ops.concat_v2(values=values, axis=axis, name=name)
      File "/Users/oshikawaakinobu/anaconda3/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1029, in concat_v2
        "ConcatV2", values=values, axis=axis, name=name)
      File "/Users/oshikawaakinobu/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 483, in _apply_op_helper
        raise TypeError("%s that don't all match." % prefix)
    TypeError: Tensors in list passed to 'values' of 'ConcatV2' Op have types [int32, int32, float32] that don't all match.
    
[/code]


CC BY-SA 4.0
2018-10-10T07:50:14.940
49132
2018-10-10T09:10:42.793
2018-10-10T09:10:42.793
3054
30450
question
python python3 tensorflow
python3のエラー "TypeError: Tensors ... that don't all match" がわからない


TypeError: Tensors in list passed to 'values' of 'ConcatV2' Op have types
[int32, int32, float32] that don't all match （直訳： 型のエラー ConcatV2' Op の値に渡されている
list内のテンソルは、[int32, int32, float32]という型を持っている。
(テンソルの値は全部が同じ型でないといけないのに）型が一致していない！  
というのが、エラーの内容です。

listを作っているところで、int32の値とfloat32の値を混用しているのがエラーの原因だ指摘されている訳ですから、そういう視点でコードを見直すと問題の箇所が見つけやすいだろうと思います。


CC BY-SA 4.0
2018-10-10T08:16:42.057
49134
2018-10-10T08:16:42.057
217
49132
answer