class_docstr: SecureNN(server_0, server_1, server_2, prime_factory, odd_factory, **kwargs)
  
  Implementation of SecureNN from
  `Wagh et al <https://eprint.iacr.org/2018/442/>`_.
class_docstr_tok: ["SecureNN","(","server_0",",","server_1",",","server_2",",","prime_factory",",","odd_factory",",","*","*","kwargs",")","Implementation","of","SecureNN","from","`","Wagh","et","al","<","https",":","\/\/eprint.iacr.org\/2018\/442\/",">","`","_","."]
code: def relu_with_cmp(self, x, **kwargs):
      def actual_relu_with_cmp(x, name_scope):
          with tf.name_scope(name_scope):
              drelu = self.non_negative(x)
              return drelu * x, drelu
  
      shape = x.shape.as_list()
  
      total_size = np.prod(shape)
  
      max_size = kwargs.get("max_size", 2500000)
      if not max_size or total_size <= max_size:
          return actual_relu_with_cmp(x, "relu")
  
      # tensor is too big and might raise OOM; split it along the last
      # dimension and process subtensors individually, using sizes as
      # close as possible to `maxsize` (but possibly larger)
  
      # compute how large the last dimension can be while being at least 1
      max_last_dimension = max(max_size // np.prod(shape[:-1]), 1)
      # compute split vector
      last_dimension = shape[-1]
      number_of_max_last_dimension = (
          last_dimension // max_last_dimension
      )
      leftover = last_dimension % max_last_dimension
      split_vector = [max_last_dimension] * number_of_max_last_dimension
      split_vector += [leftover] if leftover > 0 else []
      assert np.sum(split_vector) == last_dimension
  
      with tf.name_scope("relu"):
          xs = self.split(x, split_vector, axis=-1)
          res = []
          drelu = []
  
          for i, _ in enumerate(xs):
              d, r = actual_relu_with_cmp(xs[i], "subrelu")
              res.append(r)
              drelu.append(d)
          return self.concat(res, axis=-1), self.concat(drelu, axis=-1)
  
imports: from __future__ import absolute_import
  import math
  import random
  import sys
  from typing import Optional
  from typing import Tuple
  import numpy
  import tensorflow
  from tf_encrypted.config import get_config
  from tf_encrypted.player import Player
  from tf_encrypted.protocol import memoize
  from tf_encrypted.protocol.pond import Pond
  from tf_encrypted.protocol.pond import PondMaskedTensor
  from tf_encrypted.protocol.pond import PondPrivateTensor
  from tf_encrypted.protocol.pond import PondPublicTensor
  from tf_encrypted.protocol.pond import PondTensor
  from tf_encrypted.protocol.pond import _type
  from tf_encrypted.protocol.protocol import nodes
  from tf_encrypted.protocol.securenn.odd_tensor import oddint64_factory
  from tf_encrypted.tensor import int64factory
  from tf_encrypted.tensor import native_factory
  from tf_encrypted.tensor.factory import AbstractFactory
  from tf_encrypted.tensor.factory import AbstractTensor
label_desc: Use image node_id 17 for calling the SecureNN obj's underlying member method code with example usage: obj.relu_with_cmp(x) and returns: actual_relu_with_cmp, self,  self, unknown,  drelu