Keras输入添加尺寸自动错误

时间:2017-11-17 05:58:53

标签: keras

我是使用Keras的新手。搜索后没有结果。请救救我! 这是我的问题:

print(input_shape)

X_input = Input(input_shape)

print(X_input)

结果

(600, 64, 64, 3)
Tensor("input_5:0", shape=(?, 600, 64, 64, 3), dtype=float32)

自动添加一个维度并输入错误

ValueError: Input 0 is incompatible with layer conv0: expected ndim=4, found ndim=5

1 个答案:

答案 0 :(得分:1)

你的问题在于// the first argument to createNamedBuilder() is the name $form = $this->get('form.factory')->createNamedBuilder(null, 'form', $defaultData) ->add('from', 'date', array( 'required' => false, 'widget' => 'single_text', 'format' => 'dd.MM.yyyy' )); 中第一个维度连接到多个样本(我猜你的情况下是600)并且在定义输入keras时会跳过它。所以试试:

shape

以跳过示例维度。