Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python_io in tensorflow

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

but I get the error:

AttributeError: module 'tensorflow' has no attribute 'python_io'

I'm working with tensorflow 1.2 and python 3.

How can I fix the problem?

Thanks.

like image 271
mohamad danesh Avatar asked Jul 01 '17 17:07

mohamad danesh


2 Answers

The problem in the (python_io) :

with tf.python_io.TFRecordWriter(testing_filename) as tfrecord_writer:
# do sth

changed it to:

with tf.io.TFRecordWriter(testing_filename) as tfrecord_writer:
# do sth 
like image 165
Tofiq Avatar answered Sep 22 '22 09:09

Tofiq


Use this instead :

tf.python.python_io
like image 35
Sharaz Haider Avatar answered Sep 21 '22 09:09

Sharaz Haider