Valueerror: Shapes (none, 3, 2) And (none, 2) Are Incompatible Using Tfrecord
In the following code, I save the label to tfrecord and read it again. (In reality, I save both images and labels to tfrecord, here is a simple example for illustration purpose) .
Solution 1:
It turns out that, just change the return
statement from parse_examples
works:
return (res, {"task1":parsed_examples["image/label"],"task2":parsed_examples["image/label"],"task3":parsed_examples["image/label"]})
Where task1
,task2
,task3
are the names of the softmax layers given by me.
Post a Comment for "Valueerror: Shapes (none, 3, 2) And (none, 2) Are Incompatible Using Tfrecord"