def __init__(self, p_mod1, p_mod2, loss1, loss2, quantiles, categories):
    super(sciPENN_Model, self).__init__()
    (h_size, drop_rate) = (512, 0.25)
    self.RNNCell = RNNCell(h_size, h_size)
    self.input_block = Input_Block(p_mod1, h_size, drop_rate, drop_rate)
    self.skip_1 = FF_Block(h_size, drop_rate)
    self.skip_2 = FF_Block(h_size, drop_rate)
    self.skip_3 = FF_Block(h_size, drop_rate)
    MSE_output = Linear(h_size, p_mod2)
    if (len(quantiles) > 0):
        quantile_layer = []
        quantile_layer.append(Linear(h_size, (p_mod2 * len(quantiles))))
        quantile_layer.append(LambdaLayer((lambda x: x.view((- 1), p_mod2, len(quantiles)))))
        quantile_layer = Sequential(*quantile_layer)
        self.mod2_out = Dual_Forward(MSE_output, quantile_layer)
    else:
        self.mod2_out = MSE_output
    if (categories is not None):
        self.celltype_out = Sequential(Linear(h_size, len(categories)), Softmax(1))
        self.forward = self.forward_transfer
        self.categories_arr = empty((len(categories),), dtype='object')
        for cat in categories:
            self.categories_arr[categories[cat]] = cat
    else:
        self.forward = self.forward_simple
        self.categories_arr = None
    self.quantiles = quantiles
    (self.loss1, self.loss2) = (loss1, loss2)
def __init__(self, p_mod1, p_mod2, loss1, loss2, quantiles, categories):
    super(sciPENN_Model, self).__init__()
    (h_size, drop_rate) = (512, 0.25)
    self.RNNCell = RNNCell(h_size, h_size)
    self.input_block = Input_Block(p_mod1, h_size, drop_rate, drop_rate)
    self.skip_1 = FF_Block(h_size, drop_rate)
    self.skip_2 = FF_Block(h_size, drop_rate)
    self.skip_3 = FF_Block(h_size, drop_rate)
    MSE_output = Linear(h_size, p_mod2)
    if (len(quantiles) > 0):
        quantile_layer = []
        quantile_layer.append(Linear(h_size, (p_mod2 * len(quantiles))))
        quantile_layer.append(LambdaLayer((lambda x: x.view((- 1), p_mod2, len(quantiles)))))
        quantile_layer = Sequential(*quantile_layer)
        self.mod2_out = Dual_Forward(MSE_output, quantile_layer)
    else:
        self.mod2_out = MSE_output
    if (categories is not None):
        self.celltype_out = Sequential(Linear(h_size, len(categories)), Softmax(1))
        self.forward = self.forward_transfer
        self.categories_arr = empty((len(categories),), dtype='object')
        for cat in categories:
            self.categories_arr[categories[cat]] = cat
    else:
        self.forward = self.forward_simple
        self.categories_arr = None
    self.quantiles = quantiles
    (self.loss1, self.loss2) = (loss1, loss2)