class_docstr: Base Model class.
  This is the class from which all Models inherit.
  A model is a special layer with training and inference features.
  Users will just instantiate a model and then treat it as a callable.
  We recommend that descendants of `BaseModel` implement the following methods:
  * `__init__()`: Save configuration in member variables.
  * `call()`: model forward propagate.
  * `backward()`: model backward propagate.
  * `compile()`: set optimizer and loss.
class_docstr_tok: ["Base","Model","class",".","This","is","the","class","from","which","all","Models","inherit",".","A","model","is","a","special","layer","with","training","and","inference","features",".","Users","will","just","instantiate","a","model","and","then","treat","it","as","a","callable",".","We","recommend","that","descendants","of","`","BaseModel","`","implement","the","following","methods",":","*","`","__init__","(",")","`",":","Save","configuration","in","member","variables",".","*","`","call","(",")","`",":","model","forward","propagate",".","*","`","backward","(",")","`",":","model","backward","propagate",".","*","`","compile","(",")","`",":","set","optimizer","and","loss","."]
code: def predict(self, x, batch_size=32, reveal=True):
      y_preds = []
      data_iter = data_wrap(x, None, batch_size)
      if self.predict_function is None:
          self.predict_function = self.make_predict_function(reveal)
  
      for input_x in data_iter:
          y_pred = self.predict_function(input_x)
          y_preds.append(y_pred)
  
      if reveal:
          concat = np.concatenate
      else:
          concat = tfe.concat
  
      if isinstance(y_preds[0], list):
          y_pred = [[] for i in range(len(y_preds[0]))]
          for i in range(len(y_preds)):
              for j in range(len(y_preds[0])):
                  y_pred[j].append(y_preds[i][j])
          for i in range(len(y_preds[0])):
              y_pred[i] = concat(y_pred[i], axis=0)
      else:
          y_pred = concat(y_preds, axis=0)
      return y_pred
  
imports: import time
  from abc import abstractmethod
  from typing import Iterator
  import numpy
  import tensorflow
  from tensorflow.keras import utils
  import tf_encrypted
  from tf_encrypted.keras.engine.base_layer import Layer
  from tf_encrypted.protocol.protocol import TFEPrivateTensor
label_desc: Use image node_id 10 for calling the BaseModel obj's underlying member method code with example usage: obj.predict(x, batch_size, reveal) and returns: y_pred