张量流中的Python_io [英] Python_io in tensorflow
本文介绍了张量流中的Python_io的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用tensorflow时遇到了麻烦.我想使用TFRecordWriter()
如下:
I'm having trouble working with tensorflow. I want to use TFRecordWriter()
as below:
with tf.python_io.TFRecordWriter(testing_filename) as tfrecord_writer:
# do sth
但是我得到了错误:
AttributeError:模块'tensorflow'没有属性'python_io'
AttributeError: module 'tensorflow' has no attribute 'python_io'
我正在使用tensorflow 1.2和python 3.
I'm working with tensorflow 1.2 and python 3.
如何解决该问题?
谢谢.
推荐答案
(python_io)中的问题:
The problem in the (python_io) :
with tf.python_io.TFRecordWriter(testing_filename) as tfrecord_writer:
# do sth
将其更改为:
with tf.io.TFRecordWriter(testing_filename) as tfrecord_writer:
# do sth
这篇关于张量流中的Python_io的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文