torchsig.models.model_utils.simple_modelsΒΆ

Functions

convnet_block_1d

1d version of convnet_block_2d above

convnet_block_2d

returns a block of layers consisting of a 2d convolution, batch normalization, and activation function, with the input and output channels given by in_width and out_with, a kernel given by kernel_shape, and using the given activation_fn if no activation function is provided, this defaults to ELU

dense_block

returns a block of layers consisting of a 2d convolution, batch normalization, and activation function, with the input and output channels given by in_width and out_with, a kernel given by kernel_shape, and using the given activation_fn if no activation function is provided, this defaults to ELU

double_image_scale_2d

doubles the scale dimensions of an image of channel width width using a transposd convolution of kernel shape kernel_shape calls batch norm and an activation function provided by activation_fn on the result if no function is provided, this defaults to ELU

simple_convnet_1d

1d version of simple_convnet_2d above

simple_convnet_2d

takes in a list or tuple of convoluional channel widths and returns a sequential model with those widths used to quickly prototype convolutional neural nets; for example, simple_convnet_2d([3,8,32,64,64,1]) would return a model with 5 convolutional layers that takes in an X by Y image with 3 color channels and outputs an X by Y image with a single channel.

simple_densenet

takes in a list or tuple of dense layer widths and returns a sequential model with those widths used to quickly prototype simple feed-forward neural nets; for example, simple_densenet([6,8,32,64,64,1]) would return a model with fully-connected linear layers that takes in a vecor of length 6 and outputs a single value.