Learn R Programming

deepregression (version 2.2.0)

subnetwork_init_torch: Initializes a Subnetwork based on the Processed Additive Predictor

Description

Initializes a Subnetwork based on the Processed Additive Predictor

Usage

subnetwork_init_torch(
  pp,
  deep_top = NULL,
  orthog_fun = NULL,
  split_fun = split_model,
  shared_layers = NULL,
  param_nr = 1,
  selectfun_in = function(pp) pp[[param_nr]],
  selectfun_lay = function(pp) pp[[param_nr]],
  gaminputs,
  summary_layer = model_torch
)

Value

returns a list of input and output for this additive predictor

Arguments

pp

list of processed predictor lists from processor

deep_top

In tf approach: keras layer if the top part of the deep network after orthogonalization; Not yet implemented for torch is different to the one extracted from the provided network

orthog_fun

function used for orthogonalization; Not yet implemented for torch

split_fun

function to split the network to extract head

shared_layers

list defining shared weights within one predictor; each list item is a vector of characters of terms as given in the parameter formula

param_nr

integer number for the distribution parameter

selectfun_in, selectfun_lay

functions defining which subset of pp to take as inputs and layers for this subnetwork; per default the param_nr's entry

gaminputs

input tensors for gam terms

summary_layer

torch layer that combines inputs (typically adding or concatenating)