运行tensorflow
程序,报错如下:
tensorflow.python.framework.errors_impl.InternalError: Could not find valid device for node.
Node: {{node FusedBatchNorm}}
All kernels registered for op FusedBatchNorm :
device=‘XLA_CPU’; T in [DT_FLOAT]
device=‘XLA_CPU_JIT’; T in [DT_FLOAT]
device=‘CPU’; T in [DT_FLOAT]
[Op:FusedBatchNorm]
原因:convolutional输入数据类型为整数。
解决方法:
类型转化。x = tf.cast(x, tf.float32)