code: def gram_matrix(input):
      a, b, c, d = input.size()  # a=batch size(=1)
      # b=number of feature maps
      # (c,d)=dimensions of a f. map (N=c*d)
  
      features = input.view(a * b, c * d)  # resise F_XL into \hat F_XL
  
      G = torch.mm(features, features.t())  # compute the gram product
  
      # we 'normalize' the values of the gram matrix
      # by dividing by the number of element in each feature maps.
      return G.div(a * b * c * d)
  
imports: from __future__ import print_function
  import os
  import torch
  import torch.nn
  import torch.nn.functional
  import torch.optim
  from PIL import Image
  import matplotlib.pyplot
  import torchvision.transforms
  import torchvision.models
  import copy
  from clearml import Task
label_desc: Use image node_id 3 for calling a global function with example usage: gram_matrix(input) and returns: G