pycmtensor.models.ResLogit
Contents
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
Weightsobject for the input sidew_out (Weights) – the
Weightsobject for the output sideactivation_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)