摘要:
import torch import torch.nn as nn import torch.optim as optim '''定义模拟数据集''' inputs = torch.randn(5, 10) # 定义5个样本,每个样本的特征数位10 labels = torch.tensor([0 阅读全文
posted @ 2024-06-07 17:29
映辉
阅读(58)
评论(0)
推荐(0)
摘要:
import torch import torch.nn as nn import torch.optim as optim '''定义模型''' class SimpleModel(nn.Module): ''' 方便理解,这里只定义了一层网络 input_size: 输入维度(这里表示每个样本的 阅读全文
posted @ 2024-06-07 16:45
映辉
阅读(143)
评论(0)
推荐(0)

浙公网安备 33010602011771号