摘要:
使用__iter__, __getitem__来模拟数据处理部分 import torch.utils.data class Model(): def __init__(self, animal_list): self.animal_list = animal_list # 根据迭代batch_si 阅读全文
posted @ 2020-04-20 16:26
python我的最爱
阅读(1168)
评论(1)
推荐(1)
摘要:
# 构建apply函数体 from torch.nn import init import torch class A: def __init__(self): self.weight = torch.tensor([0.0, 0.0]) self.bias = 0 pass def apply(s 阅读全文
posted @ 2020-04-20 16:17
python我的最爱
阅读(3447)
评论(0)
推荐(0)
浙公网安备 33010602011771号