trw.layers.denses

Module Contents

Functions

denses(sizes, dropout_probability=None, with_batchnorm=False, batchnorm_momentum=0.1, activation=nn.ReLU, last_layer_is_output=False, with_flatten=True)

param sizes

trw.layers.denses.denses(sizes, dropout_probability=None, with_batchnorm=False, batchnorm_momentum=0.1, activation=nn.ReLU, last_layer_is_output=False, with_flatten=True)
Parameters
  • sizes

  • dropout_probability

  • with_batchnorm

  • batchnorm_momentum

  • activation

  • last_layer_is_output – This must be set to True if the last layer of dense is actually an output. If the last layer is an output, we should not add batch norm, dropout or activation of the last nn.Linear

  • with_flatten – if True, the input will be flattened

Returns: