tensorflow.core.example.feature_pb2.Feature

how to transform this type to python type?

Hi @zhuwei, In tensorflow 2.13 once you have an object of <class ‘tensorflow.core.example.feature_pb2.Feature’> you can get those values as a python list. For example:

float_list = tf.train.FloatList(value=[2.04, 4.08])
x=tf.train.Feature(float_list=float_list)
print(x.float_list.value)
#output: [2.0399999618530273, 4.079999923706055]

please refer to this gist for working code example. Thank you.