2020年6月5日

pytorch 中的view、reshape、permute、transpose、contiguous

摘要: pytorch 中的view、reshape、permute、transpose、contiguous 1、 contiguous https://stackoverflow.com/questions/48915810/pytorch-contiguous https://blog.csdn.ne 阅读全文

posted @ 2020-06-05 20:34 那抹阳光1994 阅读(1114) 评论(0) 推荐(0)

pytorch教程之nn.Sequential类详解——使用Sequential类来自定义顺序连接模型

摘要: 前言:类似于keras中的序贯模型,当一个模型较简单的时候,我们可以使用torch.nn.Sequential类来实现简单的顺序连接模型。这个模型也是继承自Module类的,关于这个类,后面的文章会详细介绍。 一、关于Sequential类的简介先来看一下它的定义吧,在之前,我们首先需要明确一个特别 阅读全文

posted @ 2020-06-05 16:38 那抹阳光1994 阅读(4368) 评论(0) 推荐(2)

Pytorch checkpoint

摘要: checkpoint一种用时间换空间的策略 torch.utils.checkpoint.checkpoint(function, *args, **kwargs) 为模型或模型的一部分设置Checkpoint 。 检查点用计算换内存(节省内存)。 检查点部分并不保存中间激活值,而是在反向传播时重新 阅读全文

posted @ 2020-06-05 14:48 那抹阳光1994 阅读(5952) 评论(0) 推荐(1)

导航