code: def generate_cca_projection():
      images, sentences = [
          torch.cat(l)
          for l in zip(*[(d[0], d[1][0]) for d in train_loader])
      ]
      emb = fn_to_emb(sentences.int())
      corr, (im_proj, emb_proj) = cca([images, emb], k=40)
      print("Largest eigen value from CCA: {:.3f}".format(corr[0]))
      torch.save(images.mean(dim=0), runPath + "/images_mean.pt")
      torch.save(emb.mean(dim=0), runPath + "/emb_mean.pt")
      torch.save(im_proj, runPath + "/im_proj.pt")
      torch.save(emb_proj, runPath + "/emb_proj.pt")
  
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 2 for calling a global function with example usage: generate_cca_projection() without return types