更新时间:2023-12-02 18:41:46
需要在事件累加器中转换张量值,存储为 TensorProto
消息,放入数组中,您可以使用 tf.make_ndarray
:
You need to convert the tensor values in the event accumulator, stored as TensorProto
messages, into arrays, which you can do with tf.make_ndarray
:
pd.DataFrame([(w, s, tf.make_ndarray(t)) for w, s, t in event_acc.Tensors('my_metric')],
columns=['wall_time', 'step', 'tensor'])