Skip to content

Commit

Permalink
"TypeError: in method 'ReadFromStream', argument 2 of type 'size_t' i…
Browse files Browse the repository at this point in the history
…n compression model" solved.
  • Loading branch information
brkygokcen authored Mar 31, 2020
1 parent 6d7030f commit 6f41b3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions research/compression/image_encoder/msssim.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@ def main(_):
print('\nCannot find --compared_image.\n')
return

with tf.gfile.FastGFile(FLAGS.original_image) as image_file:
img1_str = image_file.read('rb')
with tf.gfile.FastGFile(FLAGS.compared_image) as image_file:
img2_str = image_file.read('rb')
with tf.gfile.FastGFile(FLAGS.original_image, 'rb') as image_file:
img1_str = image_file.read()
with tf.gfile.FastGFile(FLAGS.compared_image, 'rb') as image_file:
img2_str = image_file.read()

input_img = tf.placeholder(tf.string)
decoded_image = tf.expand_dims(tf.image.decode_png(input_img, channels=3), 0)
Expand Down

0 comments on commit 6f41b3f

Please sign in to comment.