tf.keras.layers.BatchNormalization不接受float64作为输入类型

时间:2019-08-11 03:32:09

标签: tensorflow keras

下面是重现以下错误的示例!

import tensorflow.keras.layers as tks
input_ = tks.Input(shape=[None, None, 3], dtype='float64')
conv = tks.Conv2D(filters=3, kernel_size=3)(input_)
batch = tks.BatchNormalization()(conv)

我正在跑步tensorflow 1.14 and keras 2.4.0

TypeError:传递给参数'x'的值的数据类型float64不在允许的值列表中:float32

0 个答案:

没有答案