diversity_SR/conditionalMoments/util/tensorflowUtils.py
def SF_image_example(index,h_LR,w_LR,h_SF,w_SF,c,data_LR,data_SF):
    """
    Creates a tf.Example message ready to be written to a file.
    For writing files with LR and SF
    """
    # Create a dictionary mapping the feature name to the tf.Example-compatible
    # data type.

    feature = {
            'index'    : _int64_feature(index),
            'data_LR'   : _bytes_feature(data_LR),
            'h_LR'     : _int64_feature(h_LR),
            'w_LR'     : _int64_feature(w_LR),
            'data_SF'   : _bytes_feature(data_SF),
            'h_SF'     : _int64_feature(h_SF),
            'w_SF'     : _int64_feature(w_SF),
            'c'        : _int64_feature(c),
    }

    return tf.train.Example(features=tf.train.Features(feature=feature))

    Creates a tf.Example message ready to be written to a file.
    For writing files with LR and SF
    
Creates a tf.Example message ready to be written to a file.
For writing files with LR and SF
Creates a tf . Example message ready to be written to a file . For writing files with LR and SF
def SF_image_example(index,h_LR,w_LR,h_SF,w_SF,c,data_LR,data_SF):
    feature = {
            'index'    : _int64_feature(index),
            'data_LR'   : _bytes_feature(data_LR),
            'h_LR'     : _int64_feature(h_LR),
            'w_LR'     : _int64_feature(w_LR),
            'data_SF'   : _bytes_feature(data_SF),
            'h_SF'     : _int64_feature(h_SF),
            'w_SF'     : _int64_feature(w_SF),
            'c'        : _int64_feature(c),
    }
    return tf.train.Example(features=tf.train.Features(feature=feature))
def SF_image_example ( index , h_LR , w_LR , h_SF , w_SF , c , data_LR , data_SF ) : feature = { 'index' : _int64_feature ( index ) , 'data_LR' : _bytes_feature ( data_LR ) , 'h_LR' : _int64_feature ( h_LR ) , 'w_LR' : _int64_feature ( w_LR ) , 'data_SF' : _bytes_feature ( data_SF ) , 'h_SF' : _int64_feature ( h_SF ) , 'w_SF' : _int64_feature ( w_SF ) , 'c' : _int64_feature ( c ) , } return tf . train . Example ( features = tf . train . Features ( feature = feature ) )
Creates a tf.Example message ready to be written to a file.
Creates a tf . Example message ready to be written to a file .
"""
    Creates a tf.Example message ready to be written to a file.
    For writing files with LR and SF
    """ # Create a dictionary mapping the feature name to the tf.Example-compatible # data type.
index
h_LR
w_LR
h_SF
w_SF
c
data_LR
data_SF