FCN.tensorflow icon indicating copy to clipboard operation
FCN.tensorflow copied to clipboard

ValueError: Cannot feed value of shape (2, 227, 227, 1, 4) for Tensor 'annotation:0', which has shape '(?, 227, 227, 1)'

Open Rundong4026 opened this issue 4 years ago • 2 comments

it seems that my own labeled images are not suitable for the feed value. The batch size is 2, 227*227 pixels, single channel labeled pngs, but what is the "4" represent? Hope someone could give me a hint or help me! Will be really appriciate!

BTW, I used Labelme to annotate my own images, and used the Label.png, which are singel channel images directly, is that correct?

Rundong4026 avatar Jun 28 '20 03:06 Rundong4026

@Rundong4026 Have you fixed it yet? I have the same problem!

BaoanhTrinh avatar Feb 21 '22 02:02 BaoanhTrinh

I've solved the problem. When you get the annotations, get 2 dimention: img = misc.imread(filename)[:,:,0]

BaoanhTrinh avatar Feb 21 '22 12:02 BaoanhTrinh