1. 程式人生 > >InvalidArgumentError: Conv3DBackpropInput: Number of planes of out_backprop doesn't match computed..

InvalidArgumentError: Conv3DBackpropInput: Number of planes of out_backprop doesn't match computed..

搭建U-net網路過程中,出現以下兩種錯誤:

  1. InvalidArgumentError (see above for traceback): Conv3DBackpropInput: Number of planes of out_backprop doesn’t match computed: actual = 28, computed = 27
    [[Node: conv3d_transpose = Conv3DBackpropInputV2[T=DT_FLOAT, padding=”VALID”, strides=[1, 2, 2, 2, 1], _device=”/job:localhost/replica:0/task:0/cpu:0”](stack_1, Variable_4/read, Transition_Up_4_1/Conv3D_1)]]

  2. TypeError: shape(1, 27, 99, 127, 24) and (1, 28, 100, 128, 24) is not incompatible.

經過分析,是網路的上取樣過程中,反捲積函數出現問題,我在 conv2d_transpose() 和 conv3d_transpose() 中,引數 padding 一直是賦值 ‘VALID’,在賦值為 ‘SAME’ 後,問題解決。