diversity_SR/conditionalMoments/util/tensorflowUtils.py
def _parse_image_wind_diversityFull(example_proto):
    """
    Dictionary for reading LR and HR, and conditional moments
    """
    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),
        'mean': tf.io.FixedLenFeature([], tf.string),
        'std': tf.io.FixedLenFeature([], tf.string),
    }
    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']
    mean = tf.io.decode_raw(example['mean'], tf.float64)
    mean = tf.reshape(mean, (h_HR, w_HR, c))
    std = tf.io.decode_raw(example['std'], tf.float64)
    std = tf.reshape(std, (h_HR, w_HR, 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, mean, std

    Dictionary for reading LR and HR, and conditional moments
    
Dictionary for reading LR and HR, and conditional moments
Dictionary for reading LR and HR and conditional moments
def _parse_image_wind_diversityFull(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),
        'mean': tf.io.FixedLenFeature([], tf.string),
        'std': tf.io.FixedLenFeature([], tf.string),
    }
    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']
    mean = tf.io.decode_raw(example['mean'], tf.float64)
    mean = tf.reshape(mean, (h_HR, w_HR, c))
    std = tf.io.decode_raw(example['std'], tf.float64)
    std = tf.reshape(std, (h_HR, w_HR, 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, mean, std
def _parse_image_wind_diversityFull ( 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 ) , 'mean' : tf . io . FixedLenFeature ( [ ] , tf . string ) , 'std' : tf . io . FixedLenFeature ( [ ] , tf . string ) , } 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' ] mean = tf . io . decode_raw ( example [ 'mean' ] , tf . float64 ) mean = tf . reshape ( mean , ( h_HR , w_HR , c ) ) std = tf . io . decode_raw ( example [ 'std' ] , tf . float64 ) std = tf . reshape ( std , ( h_HR , w_HR , 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 , mean , std
Dictionary for reading LR and HR, and conditional moments
Dictionary for reading LR and HR and conditional moments
"""
    Dictionary for reading LR and HR, and conditional moments
    """
example_proto