C2_W4_Lab_3_Images - why is the one hot encoding vector a float list?

Why is the one hot encoding vector a float list?
Probably because the label_id that is used in this dataset is a float. And a cast are requiring more resources. So there is no gain in casting this value to an int?

‘label_xf’: {‘floatList’: {‘value’: [0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0,
0.0]}}}}}]

Yeah its probably because its set as a float, maybe to keep uniformity with the other features I would guess. Also float and int have the same number of bytes, 4 bytes so its not that one takes less memory than the other.

1 Like