如何将.tfrecord文件读入R?

时间:2017-02-21 17:55:18

标签: r tensorflow

是否可以将TensorFlow的.tfrecord文件读入R?

我想它看起来应该是这样的:

library(tensorflow)
sess <- tf$InteractiveSession()
TFdata <- tf$TFRecordReader(...)

但我不确定...应该是什么,以及我是否接近。

修改

我设法做到这一点:

filename <- "file.tfrecord"
records <- iterate(tf$python_io$tf_record_iterator(filename))

records是我预期的正确大小的列表,但我不熟悉列表中元素的类:

class(records[[1]])

[1]“python.builtin.str”“python.builtin.basestring”“python.builtin.object”

我可能必须使用网状R包中的函数。任何建议都将非常感谢。

0 个答案:

没有答案
相关问题