Module
MODULECLASStorch.nn.Module(args, kwargs*)[SOURCE]层、模型的父类Base class for all neural network modules.Your models should also subclass this class.Modules can also contain other Modules, allowing to nest them in a tree structure. You can assign the submodules as regular attributes:import torch.nn as nn
import torch.nn.functional as F
class Model(nn.Module):
def __init__(self):
...