code: def calculate_corr(images, embeddings):
      global RESET
      if not os.path.exists(runPath + "/images_mean.pt") or RESET:
          generate_cca_projection()
          RESET = False
      im_mean = torch.load(runPath + "/images_mean.pt")
      emb_mean = torch.load(runPath + "/emb_mean.pt")
      im_proj = torch.load(runPath + "/im_proj.pt")
      emb_proj = torch.load(runPath + "/emb_proj.pt")
      with torch.no_grad():
          corr = F.cosine_similarity(
              (images - im_mean) @ im_proj,
              (embeddings - emb_mean) @ emb_proj,
          ).mean()
      return corr
  
file_path: mmvae/src/report/analyse_cub.py
imports: import argparse
  import os
  import sys
  import torch
  import torch.nn.functional
  import inspect
  import models
  from utils import Logger, Timer, unpack_data
  from helper import cca, fetch_emb, fetch_weights, fetch_pc, apply_weights, apply_pc
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_corr(images, embeddings) and returns: corr