摘要: 参考这个问答,有两种方法。 第一种,在定义 nn.Sequential 时传入 OrderedDict 类型变量。 import collections import torch model = torch.nn.Sequential( collections.OrderedDict( [ ("co 阅读全文
posted @ 2024-03-18 21:26 倒地 阅读(241) 评论(0) 推荐(0)