摘要:
下面实现了深度学习中的几种优化器,包括SGD,Momentum, Nesterov,AdaGrad,RMSProp,AdaDelta,Adam和AdamW。 代码如下: import torch import torch.nn as nn from torchvision import transf 阅读全文
摘要:
简单训练了一个模型,可以实现超分辨率效果。模型在这里。 模型用了一些卷积层,最后接一个PixelShuffle算子。 训练数据是原始图像resize后的亮度通道。 标签是原始图像的亮度通道。 损失函数设为MSE。 代码如下: import torch import torch.nn as nn im 阅读全文