File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change 11import torch
2-
3- """
4- A simple neural network model for classification tasks.
5- Parameters
6- ----------
7- in_channels : int
8- Number of input channels.
9- num_classes : int
10- Number of output classes.
11- Attributes
12- ----------
13- in_channels : int
14- Number of input channels.
15- num_classes : int
16- Number of output classes.
17- fc1 : nn.Linear
18- First fully connected layer.
19- fc2 : nn.Linear
20- Second fully connected layer.
21- out : nn.Linear
22- Output fully connected layer.
23- leaky_relu : nn.LeakyReLU
24- Leaky ReLU activation function.
25- flatten : nn.Flatten
26- Flatten layer to reshape input tensor.
27- Methods
28- -------
29- forward(x)
30- Defines the forward pass of the model.
31- """
322import torch .nn as nn
333
344
You can’t perform that action at this time.
0 commit comments