Mina Melek
Mina Melek

Reputation: 305

unicodedecodeerror: 'utf-8' codec can't decode byte 0xff in position 35: invalid start byte tf.gfile.Open

I have this error on this part of the code:

with tf.gfile.Open(output_frozen_graph_name, "r") as f:
   data = f.read()
   input_graph_def.ParseFromString(data)

and when I search for solutions all what I found solutions for regular files ,but I'm just new to tensorflow

Upvotes: 1

Views: 1273

Answers (1)

Read it as a binary file. Replace your first line with:

with tf.gfile.Open(output_frozen_graph_name, "rb") as f:

Upvotes: 2

Related Questions