3d ValueError:(';无法识别的关键字参数:';,dict#u键([';input#u shape';])加载模型时
3d ValueError:(';无法识别的关键字参数:';,dict#u键([';input#u shape';])加载模型时,3d,python-3.6,tensorflow2.0,image-segmentation,unity3d-unet,3d,Python 3.6,Tensorflow2.0,Image Segmentation,Unity3d Unet,在此处输入代码我正在使用google colab在哪里使用免费gpu,需要tensorflow 2.0。输入层包含4个元组通道,即多个3d图像。我调用了一个函数: input_shape= input_shape=(4,96,96,96) model = build_model(input_shape=input_shape, output_channels=3) def build_model(input_shape=(4, 96,96,96), output_cha
在此处输入代码
我正在使用google colab在哪里使用免费gpu,需要tensorflow 2.0。输入层包含4个元组通道,即多个3d图像。我调用了一个函数:
input_shape= input_shape=(4,96,96,96)
model = build_model(input_shape=input_shape, output_channels=3)
def build_model(input_shape=(4, 96,96,96), output_channels=3, weight_L2=0.1, weight_KL=0.1):
## Input Layer
inp = tf.keras.Input(shape=[4,96,96,96],name='inp')
## The Initial Block
x = tf.keras.layers.Conv3D(
filters=32,
kernel_size=(3, 3, 3),
strides=1,
padding='same',
data_format='channels_first',
name='Input_x1')(inp)
## Dropout (0.2)
x = tf.keras.layers.Dropout(0.2)(x)
## Green Block x1 (output filters = 32)
x1 = tf.green_block(x, tf.constant(32), name='x1')
x = tf.keras.layers.Conv3D(
filters=32,
kernel_size=(3, 3, 3),
strides=2,
padding='same',
data_format='channels_first',
name='Enc_DownSample_32')(x1)
我得到了以下错误:
ValueError回溯(最近一次调用上次)
在()
--->89模型=构建模型(输入形状=输入形状,输出通道=3)
90
91型号拟合(数据、标签、批次尺寸=1、历代=100)
1帧
/输入中的usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/input\u layer.py(形状、批次大小、名称、数据类型、稀疏、张量、不规则、**kwargs)
-->287 raise VALUERROR('无法识别的关键字参数:',kwargs.keys())
288
289如果形状为无且张量为无:
ValueError:(“无法识别的关键字参数:”,dict_键(['input_shape']))
286 if kwargs: