Skip to content

Commit

Permalink
Remove Deprecated Functions and Libraries
Browse files Browse the repository at this point in the history
imread is now no longer present at scipy.misc, imageio is preferred.
tf.io.gfile.FastGFile() is now deprecated, tf.io.GFile() is preferred.
  • Loading branch information
pratjosh9 committed Nov 21, 2019
1 parent b9e7200 commit cfab3d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fid.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import os
import gzip, pickle
import tensorflow as tf
from scipy.misc import imread
from imageio import imread
from scipy import linalg
import pathlib
import urllib
Expand All @@ -34,7 +34,7 @@ class InvalidFIDException(Exception):
def create_inception_graph(pth):
"""Creates a graph from saved GraphDef file."""
# Creates graph from saved graph_def.pb.
with tf.io.gfile.FastGFile( pth, 'rb') as f:
with tf.io.gfile.GFile( pth, 'rb') as f:
graph_def = tf.compat.v1.GraphDef()
graph_def.ParseFromString( f.read())
_ = tf.import_graph_def( graph_def, name='FID_Inception_Net')
Expand Down

0 comments on commit cfab3d5

Please sign in to comment.