pycmtensor.models.ResLogit#

Module Contents#

class pycmtensor.models.ResLogit.ResLogitLayer(input, w_in, w_out, activation_in=None, activation_out=None)[source]#

Definition of the ResLogit neural net layer

Parameters
  • input (list or TensorVariable) – a list of tensors corresponding to the

  • utilities (vector of) –

  • value. (or a TensorVariable vector) –

  • w_in (Weights) – the Weights object for the input side

  • w_out (Weights) – the Weights object for the output side

  • activation_in (function, optional) – the activation function to use. If

  • None

  • aet.sigmoid() (use) –

  • activation_out (function, optional) – the activation function to use. If

  • None

  • aet.sigmoid()

output#

the output of this layer. Pass this value onto the next layer or

into the final model.

Example

U = … W_1 = Weights(“W_1”, (3, 10), 0) W_2 = Weights(“W_2”, (10, 3), 0) U = ResLogitLayer(U, W_1, W_2).output mymodel = MNL(u=U, av=AV, database=db)

get_layer_outputs()[source]#

Returns the layer output vector. Size of vector is equals to the size of the input

Returns

this layer output

Return type

TensorVariable