Class FullConnBaseNet
The class FullConnBaseNet
is a subclass of torch.nn.Module
.
It implements a basic structure of fully-connected network
without the forward
method.
API Documentation¶
Bases: Module
__init__(input_dim=1, output_dim=1, layer_size=[64, 64], activation='tanh', normalize_input=False)
¶
Initialize the FullConnResNet instance.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
input_dim
|
int
|
The input dimension. Defaults to 1. |
1
|
layer_size
|
list
|
The list of layer sizes. Defaults to [64, 64]. |
[64, 64]
|
output_dim
|
int
|
The output dimension. Defaults to 1. |
1
|
activation
|
str
|
The activation function. Defaults to 'tanh'. |
'tanh'
|
forward(inputs)
¶
Apply the network to the input inputs
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs
|
tensor
|
The input \(\mathbb{R}^{N \times N_x}\). |
required |
Returns:
Type | Description |
---|---|
tensor
|
The output \(\mathbb{R}^{N \times N_y}\). |