docstr: Neural net predictive model. The dragon has three heads.
  
  Args:
      input_dim (int): number of rows in input
  Returns:
      model (keras.models.Model): DragonNet model
docstr_tok: ["Neural","net","predictive","model",".","The","dragon","has","three","heads",".","Args",":","input_dim","(","int",")",":","number","of","rows","in","input","Returns",":","model","(","keras.models.Model",")",":","DragonNet","model"]
code: def make_dragonnet(self, input_dim):
      """
      Neural net predictive model. The dragon has three heads.
  
      Args:
          input_dim (int): number of rows in input
      Returns:
          model (keras.models.Model): DragonNet model
      """
      inputs = Input(shape=(input_dim,), name="input")
  
      # representation
      x = Dense(
          units=self.neurons_per_layer,
          activation="elu",
          kernel_initializer="RandomNormal",
      )(inputs)
      x = Dense(
          units=self.neurons_per_layer,
          activation="elu",
          kernel_initializer="RandomNormal",
      )(x)
      x = Dense(
          units=self.neurons_per_layer,
          activation="elu",
          kernel_initializer="RandomNormal",
      )(x)
  
      t_predictions = Dense(units=1, activation="sigmoid")(x)
  
      # HYPOTHESIS
      y0_hidden = Dense(
          units=int(self.neurons_per_layer / 2),
          activation="elu",
          kernel_regularizer=l2(self.reg_l2),
      )(x)
      y1_hidden = Dense(
          units=int(self.neurons_per_layer / 2),
          activation="elu",
          kernel_regularizer=l2(self.reg_l2),
      )(x)
  
      # second layer
      y0_hidden = Dense(
          units=int(self.neurons_per_layer / 2),
          activation="elu",
          kernel_regularizer=l2(self.reg_l2),
      )(y0_hidden)
      y1_hidden = Dense(
          units=int(self.neurons_per_layer / 2),
          activation="elu",
          kernel_regularizer=l2(self.reg_l2),
      )(y1_hidden)
  
      # third
      y0_predictions = Dense(
          units=1,
          activation=None,
          kernel_regularizer=l2(self.reg_l2),
          name="y0_predictions",
      )(y0_hidden)
      y1_predictions = Dense(
          units=1,
          activation=None,
          kernel_regularizer=l2(self.reg_l2),
          name="y1_predictions",
      )(y1_hidden)
  
      dl = EpsilonLayer()
      epsilons = dl(t_predictions, name="epsilon")
      concat_pred = Concatenate(1)(
          [y0_predictions, y1_predictions, t_predictions, epsilons]
      )
      model = Model(inputs=inputs, outputs=concat_pred)
  
      return model
  
file_path: causalml/causalml/inference/tf/dragonnet.py
imports: import numpy
  from tensorflow.keras import Input, Model
  from tensorflow.keras.callbacks import EarlyStopping, ReduceLROnPlateau, TerminateOnNaN
  from tensorflow.keras.layers import Dense, Concatenate
  from tensorflow.keras.optimizers import SGD, Adam
  from tensorflow.keras.regularizers import l2
  from causalml.inference.tf.utils import dragonnet_loss_binarycross, EpsilonLayer, regression_loss, binary_classification_loss, treatment_accuracy, track_epsilon, make_tarreg_loss
  from causalml.inference.meta.utils import convert_pd_to_np
label_desc: Use image node_id 2 for calling the DragonNet obj's underlying member method code with example usage: obj.make_dragonnet(input_dim) and returns: model