original_docstring: Compute the sctructural similarity score.
docstring: Compute the sctructural similarity score.
docstring_tokens: Compute the sctructural similarity score .
code: def ssim_metric(batch1, batch2):
      """Compute the sctructural similarity score."""
      S = []
      # Assumption is made that there is a batch size
      assert len(batch1.shape) == 4
      for a, b in zip(batch1, batch2):
          s = compare_ssim(a, b, multichannel=True)
          S += [s]
      return np.array(S)
code_tokens: def ssim_metric ( batch1 , batch2 ) : S = [ ] assert len ( batch1 . shape ) == 4 for a , b in zip ( batch1 , batch2 ) : s = compare_ssim ( a , b , multichannel = True ) S += [ s ] return np . array ( S )
short_docstring: Compute the sctructural similarity score.
short_docstring_tokens: Compute the sctructural similarity score .
comment: """Compute the sctructural similarity score."""$SEP$# Assumption is made that there is a batch size