code: def compare_mtcnn(pt_mdl, tf_fun, sess, ind, test_data):
      tf_mdls = tf_fun(sess)
      tf_mdl = tf_mdls[ind]
  
      print("\nPassing test data through TF model\n")
      tf_output = tf_mdl(test_data.numpy())
      tf_output = [torch.tensor(out) for out in tf_output]
      print("\n".join([str(o.view(-1)[:10]) for o in tf_output]))
  
      print("\nPassing test data through PT model\n")
      with torch.no_grad():
          pt_output = pt_mdl(test_data.permute(0, 3, 2, 1))
      pt_output = [torch.tensor(out) for out in pt_output]
      for i in range(len(pt_output)):
          if len(pt_output[i].shape) == 4:
              pt_output[i] = (
                  pt_output[i].permute(0, 3, 2, 1).contiguous()
              )
      print("\n".join([str(o.view(-1)[:10]) for o in pt_output]))
  
      distance = [
          (tf_o - pt_o).norm()
          for tf_o, pt_o in zip(tf_output, pt_output)
      ]
      print(f"\nDistance {distance}\n")
  
imports: import tensorflow
  import torch
  import json
  import os, sys
  from dependencies.facenet.src import facenet
  from dependencies.facenet.src.models import inception_resnet_v1
  from dependencies.facenet.src.align import detect_face
  from models.inception_resnet_v1 import InceptionResnetV1
  from models.mtcnn import PNet, RNet, ONet
label_desc: Use image node_id 18 for calling a global function with example usage: compare_mtcnn(pt_mdl, tf_fun, sess, ind, test_data) without return types