src/ArtGenerator.py
def calculateMultiscaleStructuralSimilarity(labels, images1):
    """
    Calculates the similarity between pairs of images made by the generator. Returns a set of values in the range [0, 1] where the closer to
    1 means the more similar the images. Large values returned from this means there has been mode collapse in the generator. This will be used
    as an extra metric during training to make sure the generator is learning properly.
    """
    # Create a set of noise of size (batchSize, 100)
    noise = tf.random.normal((labels.shape[0], 100))
    # Generate 2nd set of images
    images2 = generator((noise, labels))
    # Calculate the Multiscale Structural Similarity. max_val is 2 because the images range is [-1, 1]
    return tf.image.ssim_multiscale(images1, images2, 2)

    Calculates the similarity between pairs of images made by the generator. Returns a set of values in the range [0, 1] where the closer to
    1 means the more similar the images. Large values returned from this means there has been mode collapse in the generator. This will be used
    as an extra metric during training to make sure the generator is learning properly.
    
Calculates the similarity between pairs of images made by the generator. Returns a set of values in the range [0, 1] where the closer to
1 means the more similar the images. Large values returned from this means there has been mode collapse in the generator. This will be used
as an extra metric during training to make sure the generator is learning properly.
Calculates the similarity between pairs of images made by the generator . Returns a set of values in the range [ 0 1 ] where the closer to 1 means the more similar the images . Large values returned from this means there has been mode collapse in the generator . This will be used as an extra metric during training to make sure the generator is learning properly .
def calculateMultiscaleStructuralSimilarity(labels, images1):
    noise = tf.random.normal((labels.shape[0], 100))
    images2 = generator((noise, labels))
    return tf.image.ssim_multiscale(images1, images2, 2)
def calculateMultiscaleStructuralSimilarity ( labels , images1 ) : noise = tf . random . normal ( ( labels . shape [ 0 ] , 100 ) ) images2 = generator ( ( noise , labels ) ) return tf . image . ssim_multiscale ( images1 , images2 , 2 )
Calculates the similarity between pairs of images made by the generator.
Calculates the similarity between pairs of images made by the generator .
"""
    Calculates the similarity between pairs of images made by the generator. Returns a set of values in the range [0, 1] where the closer to
    1 means the more similar the images. Large values returned from this means there has been mode collapse in the generator. This will be used
    as an extra metric during training to make sure the generator is learning properly.
    """ # Create a set of noise of size (batchSize, 100) # Generate 2nd set of images # Calculate the Multiscale Structural Similarity. max_val is 2 because the images range is [-1, 1]
labels
images1