07 2018 档案

摘要:numpy.expand_dims(a, axis) Expand the shape of an array. Insert a new axis that will appear at the axis position in the expanded array shape. Input ar 阅读全文
posted @ 2018-07-18 23:24 琴影 阅读(41201) 评论(0) 推荐(0) 编辑
摘要:先mark 阅读全文
posted @ 2018-07-15 00:06 琴影 阅读(387) 评论(0) 推荐(0) 编辑
摘要:本文分为两部分,第一部分讲如何保存模型参数,优化器参数等等,第二部分则讲如何读取。 假设网络为model = Net(), optimizer = optim.Adam(model.parameters(), lr=args.lr), 假设在某个epoch,我们要保存模型参数,优化器参数以及epoc 阅读全文
posted @ 2018-07-15 00:05 琴影 阅读(99380) 评论(5) 推荐(10) 编辑
摘要:有时间再写。 阅读全文
posted @ 2018-07-15 00:05 琴影 阅读(1753) 评论(1) 推荐(0) 编辑
摘要:假设我们只保存了模型的参数(model.state_dict())到文件名为modelparameters.pth, model = Net() 1. cpu -> cpu或者gpu -> gpu: checkpoint = torch.load('modelparameters.pth') mod 阅读全文
posted @ 2018-07-14 23:47 琴影 阅读(9743) 评论(0) 推荐(0) 编辑