class_docstr: Benchmarks runtime and accuracy of crypten models
  
  Models are benchmarked on synthetically generated
  Gaussian clusters for binary classification. Resnet18 is
  benchmarks use image data.
  
  Args:
      n_samples (int): number of samples for Gaussian cluster model training
      n_features (int): number of features for the Gaussian clusters.
      epochs (int): number of training epochs
      lr_rate (float): learning rate.
class_docstr_tok: ["Benchmarks","runtime","and","accuracy","of","crypten","models","Models","are","benchmarked","on","synthetically","generated","Gaussian","clusters","for","binary","classification",".","Resnet18","is","benchmarks","use","image","data",".","Args",":","n_samples","(","int",")",":","number","of","samples","for","Gaussian","cluster","model","training","n_features","(","int",")",":","number","of","features","for","the","Gaussian","clusters",".","epochs","(","int",")",":","number","of","training","epochs","lr_rate","(","float",")",":","learning","rate","."]
docstr: Evaluates accuracy of crypten versus plain text models
docstr_tok: ["Evaluates","accuracy","of","crypten","versus","plain","text","models"]
code: def evaluate(self):
      """Evaluates accuracy of crypten versus plain text models"""
      accuracies, accuracies_crypten = [], []
  
      for model in self.models:
          model_plain = model.plain
          if hasattr(model_plain, "to"):
              model_plain = model_plain.to(self.device)
          x, y = model.data.x, model.data.y
          x, y = x.to(device=self.device), y.to(device=self.device)
          _, model_plain = self.train(
              model_plain, x, y, model.epochs, model.lr, model.loss
          )
  
          x_test = model.data.x_test.to(device=self.device)
          y_test = model.data.y_test.to(device=self.device)
          accuracy = ModelBenchmarks.calc_accuracy(
              model_plain(x_test), y_test
          )
          accuracies.append(accuracy)
  
          model_crypten = model.crypten
          if hasattr(model_crypten, "to"):
              model_crypten = model_crypten.to(self.device)
          model_crypten = model_crypten.encrypt()
          if model.advanced:
              y = model.data.y_onehot.to(self.device)
          x_enc = crypten.cryptensor(x)
          y_enc = crypten.cryptensor(y)
          _, model_crypten = self.train_crypten(
              model_crypten,
              x_enc,
              y_enc,
              model.epochs,
              model.lr,
              model.loss,
          )
          x_test_enc = crypten.cryptensor(x_test)
  
          output = model_crypten(x_test_enc).get_plain_text()
          accuracy = ModelBenchmarks.calc_accuracy(output, y_test)
          accuracies_crypten.append(accuracy)
  
      return accuracies, accuracies_crypten
  
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 10 for calling the ModelBenchmarks obj's underlying member method code with example usage: obj.evaluate() and returns: accuracies,  accuracies_crypten