class_docstr: CoFrNet_Model is the base class for Continued Fractions Nets (CoFrNets).
  
  References:
      .. [#1] CoFrNets: Interpretable Neural Architecture Inspired by Continued Fractions, NeurIPS 2021. 
      Isha Puri, Amit Dhurandhar, Tejaswini Pedapati, Karthikeyan Shanmugam, Dennis Wei, Kush R Varshney. 
      https://proceedings.neurips.cc/paper/2021/file/b538f279cb2ca36268b23f557a831508-Paper.pdf
class_docstr_tok: ["CoFrNet_Model","is","the","base","class","for","Continued","Fractions","Nets","(","CoFrNets",")",".","References",":","..","[","#","1","]","CoFrNets",":","Interpretable","Neural","Architecture","Inspired","by","Continued","Fractions",",","NeurIPS","2021",".","Isha","Puri",",","Amit","Dhurandhar",",","Tejaswini","Pedapati",",","Karthikeyan","Shanmugam",",","Dennis","Wei",",","Kush","R","Varshney",".","https",":","\/\/proceedings.neurips.cc\/paper\/2021\/file\/b538f279cb2ca36268b23f557a831508-Paper.pdf"]
docstr: Customized forward function. 
docstr_tok: ["Customized","forward","function","."]
code: def forward(self, x):
      """
      Customized forward function.
      """
      # l_output --> layer output, a_output --> activation output
      for i in range(len(self.layers)):
          if i == 0:
              l_input = x
              l_output = self.layers[i](l_input)
              a_output = self.modified_reciprocal_activation(l_output)
          elif (i > 0) and (i != len(self.layers) - 1):
              l_input = x
              l_output = self.layers[i](l_input) + prev_output
              # l_output = self.dropout(l_output)
              a_output = self.modified_reciprocal_activation(l_output)
          else:
              l_input = prev_output
              # l_input = self.dropout(l_input)
              l_output = self.layers[i](l_input)
              a_output = l_output
          prev_output = a_output
      return a_output
  
imports: import sys
  import pandas
  import numpy
  import torch
  import torch.nn
  from torch.autograd import Function
  from torch.nn.parameter import Parameter
  import torch.nn.functional
  from sklearn.preprocessing import MinMaxScaler
  from sklearn.model_selection import train_test_split
  from aix360.algorithms.cofrnet.utils import generate_connections
  from aix360.algorithms.cofrnet.utils import process_data
  from aix360.algorithms.cofrnet.CustomizedLinearClasses import CustomizedLinearFunction
  from aix360.algorithms.cofrnet.CustomizedLinearClasses import CustomizedLinear
  from aix360.algorithms.die import DIExplainer
label_desc: Use image node_id 3 for calling the CoFrNet_Model obj's underlying member method code with example usage: obj.forward(x) and returns: a_output