class_docstr: Benchmarks runtime and error of crypten functions against PyTorch
  
  Args:
      tensor_size (int or tuple): size of tensor for benchmarking runtimes
class_docstr_tok: ["Benchmarks","runtime","and","error","of","crypten","functions","against","PyTorch","Args",":","tensor_size","(","int","or","tuple",")",":","size","of","tensor","for","benchmarking","runtimes"]
docstr: Computes the total error of approximations
docstr_tok: ["Computes","the","total","error","of","approximations"]
code: def get_errors(self):
      """Computes the total error of approximations"""
      abs_errors, relative_errors = [], []
  
      functions = FuncBenchmarks.UNARY + FuncBenchmarks.BINARY
      functions += FuncBenchmarks.LAYERS
  
      for func in functions:
          ref, out_enc = self.call_function_on_domain(func)
          out = out_enc.get_plain_text()
  
          abs_error = FuncBenchmarks.calc_abs_error(ref, out)
          abs_errors.append(abs_error)
  
          relative_error = FuncBenchmarks.calc_relative_error(ref, out)
          relative_errors.append(relative_error)
  
      return abs_errors, relative_errors
  
imports: import argparse
  import functools
  import os
  import timeit
  from collections import namedtuple
  import crypten
  import crypten.communicator
  import numpy
  import pandas
  import torch
  from examples import multiprocess_launcher
label_desc: Use image node_id 11 for calling the FuncBenchmarks obj's underlying member method code with example usage: obj.get_errors() and returns: abs_errors,  relative_errors