我正在尝试运行类似于Keras文档"VGG-like convnet"中的CNN,但用于自定义图像集和二进制分类而不是10级输出.
当我尝试适应CNN时,我得到了这个漫长的错误,我假设它告诉我输入的图像大小不是CNN输入的正确大小.
ValueError: GpuDnnConv images and kernel must have the same stack size
Apply node that caused the error: GpuDnnConv{algo='small', inplace=True}(GpuContiguous.0, GpuContiguous.0, GpuAllocEmpty.0, GpuDnnConvDesc{border_mode='valid', subsample=(1, 1), conv_mode='conv', precision='float32'}.0, Constant{1.0}, Constant{0.0})
Toposort index: 130
Inputs types: [CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), CudaNdarrayType(float32, 4D), <theano.gof.type.CDataType object at 0x7f0eefc8d790>, Scalar(float32), Scalar(float32)]
Inputs shapes: [(32, 232, 300, 3), (300, 1, 3, 3), (32, 300, 298, 1), 'No shapes', (), ()]
Inputs strides: [(208800, 900, 3, 1), (9, 0, 3, 1), (89400, 298, …Run Code Online (Sandbox Code Playgroud)