(inception_path)
Creates a graph from saved GraphDef file.

    Args:
        inception_path (str): Directory for storing the inception model.

    Returns:
        None
Creates a graph from saved GraphDef file.
Creates a graph from saved GraphDef file .
def create_inception_graph(inception_path):
    """
    Creates a graph from saved GraphDef file.

    Args:
        inception_path (str): Directory for storing the inception model.

    Returns:
        None
    """
    if not os.path.exists(inception_path):
        os.makedirs(inception_path)

    # Get inception model file path
    model_file = _check_or_download_inception(inception_path)

    # Creates graph from saved graph_def.pb.
    with tf.io.gfile.GFile(model_file, 'rb') as f:
        graph_def = tf.compat.v1.GraphDef()
        graph_def.ParseFromString(f.read())
        _ = tf.import_graph_def(graph_def, name='inception_model')
def create_inception_graph ( inception_path ) : if not os . path . exists ( inception_path ) : os . makedirs ( inception_path ) # Get inception model file path model_file = _check_or_download_inception ( inception_path ) # Creates graph from saved graph_def.pb. with tf . io . gfile . GFile ( model_file , 'rb' ) as f : graph_def = tf . compat . v1 . GraphDef ( ) graph_def . ParseFromString ( f . read ( ) ) _ = tf . import_graph_def ( graph_def , name = 'inception_model' )