1
torch.nn中的ModuleList和Sequential取舍 :
①需要改层名:Sequential 不需要写forward (通常用于简单网络积木块的书写)
②循环写重复性层/forward想自己操作一下; ModuleList 但是得写forward
个人记录
最新推荐文章于 2023-04-02 18:01:35 发布
1
torch.nn中的ModuleList和Sequential取舍 :
①需要改层名:Sequential 不需要写forward (通常用于简单网络积木块的书写)
②循环写重复性层/forward想自己操作一下; ModuleList 但是得写forward