摘要:
实现代码如下: import torch.functional as F class LeNet(torch.nn.Module): def __init__(self): super(LeNet, self).__init__() # 1 input image channel (black & 阅读全文
posted @ 2022-02-03 14:56
Geeksongs
阅读(152)
评论(0)
推荐(0)
摘要:
保存模型: torch.save(model, 'model.pth') 加载模型: model = torch.load('model.pth') 阅读全文
posted @ 2022-02-03 11:45
Geeksongs
阅读(42)
评论(0)
推荐(0)
摘要:
自定义数据集的代码如下: import os import pandas as pd from torchvision.io import read_image class CustomImageDataset(Dataset): def __init__(self, annotations_fil 阅读全文
posted @ 2022-02-03 11:40
Geeksongs
阅读(423)
评论(0)
推荐(0)

浙公网安备 33010602011771号