diversity_SR/conditionalMoments/util/tensorflowUtils.py
def _parse_image_wind_function(example_proto):
    """
    Dictionary for reading LR and HR
    """
    image_feature_description = {
        'index': tf.io.FixedLenFeature([], tf.int64),
        'data_LR': tf.io.FixedLenFeature([], tf.string),
        'h_LR': tf.io.FixedLenFeature([], tf.int64),
        'w_LR': tf.io.FixedLenFeature([], tf.int64),
        'data_HR': tf.io.FixedLenFeature([], tf.string),
        'h_HR': tf.io.FixedLenFeature([], tf.int64),
        'w_HR': tf.io.FixedLenFeature([], tf.int64),
        'c': tf.io.FixedLenFeature([], tf.int64),
    }
    example = tf.io.parse_single_example(example_proto, image_feature_description)
    h_HR, w_HR, c = example['h_HR'], example['w_HR'], example['c']
    h_LR, w_LR, c = example['h_LR'], example['w_LR'], example['c']
    data_HR = tf.io.decode_raw(example['data_HR'], tf.float64)
    data_HR = tf.reshape(data_HR, (1 , h_HR, w_HR, c))
    data_LR = tf.io.decode_raw(example['data_LR'], tf.float64)
    data_LR = tf.reshape(data_LR, (1 , h_LR, w_LR, c))
    return data_HR, data_LR

    Dictionary for reading LR and HR
    
Dictionary for reading LR and HR
Dictionary for reading LR and HR
def _parse_image_wind_function(example_proto):
    image_feature_description = {
        'index': tf.io.FixedLenFeature([], tf.int64),
        'data_LR': tf.io.FixedLenFeature([], tf.string),
        'h_LR': tf.io.FixedLenFeature([], tf.int64),
        'w_LR': tf.io.FixedLenFeature([], tf.int64),
        'data_HR': tf.io.FixedLenFeature([], tf.string),
        'h_HR': tf.io.FixedLenFeature([], tf.int64),
        'w_HR': tf.io.FixedLenFeature([], tf.int64),
        'c': tf.io.FixedLenFeature([], tf.int64),
    }
    example = tf.io.parse_single_example(example_proto, image_feature_description)
    h_HR, w_HR, c = example['h_HR'], example['w_HR'], example['c']
    h_LR, w_LR, c = example['h_LR'], example['w_LR'], example['c']
    data_HR = tf.io.decode_raw(example['data_HR'], tf.float64)
    data_HR = tf.reshape(data_HR, (1 , h_HR, w_HR, c))
    data_LR = tf.io.decode_raw(example['data_LR'], tf.float64)
    data_LR = tf.reshape(data_LR, (1 , h_LR, w_LR, c))
    return data_HR, data_LR
def _parse_image_wind_function ( example_proto ) : image_feature_description = { 'index' : tf . io . FixedLenFeature ( [ ] , tf . int64 ) , 'data_LR' : tf . io . FixedLenFeature ( [ ] , tf . string ) , 'h_LR' : tf . io . FixedLenFeature ( [ ] , tf . int64 ) , 'w_LR' : tf . io . FixedLenFeature ( [ ] , tf . int64 ) , 'data_HR' : tf . io . FixedLenFeature ( [ ] , tf . string ) , 'h_HR' : tf . io . FixedLenFeature ( [ ] , tf . int64 ) , 'w_HR' : tf . io . FixedLenFeature ( [ ] , tf . int64 ) , 'c' : tf . io . FixedLenFeature ( [ ] , tf . int64 ) , } example = tf . io . parse_single_example ( example_proto , image_feature_description ) h_HR , w_HR , c = example [ 'h_HR' ] , example [ 'w_HR' ] , example [ 'c' ] h_LR , w_LR , c = example [ 'h_LR' ] , example [ 'w_LR' ] , example [ 'c' ] data_HR = tf . io . decode_raw ( example [ 'data_HR' ] , tf . float64 ) data_HR = tf . reshape ( data_HR , ( 1 , h_HR , w_HR , c ) ) data_LR = tf . io . decode_raw ( example [ 'data_LR' ] , tf . float64 ) data_LR = tf . reshape ( data_LR , ( 1 , h_LR , w_LR , c ) ) return data_HR , data_LR
Dictionary for reading LR and HR
Dictionary for reading LR and HR
"""
    Dictionary for reading LR and HR
    """
example_proto