![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
深度学习
HKO
这个作者很懒,什么都没留下…
展开
-
mindspore相关报错
mindspore重写WithLossCell,TrainOneStepCell接口 错误:RuntimeError: _kernel.cc:88 CheckParam] AddN output shape must be equal to input shape.Trace: In file add_impl.py(272)/ return F.addn((x, y))/ 解决方案:不要在WithLossCell的construct方法中返回多个参数,否则就会在TrainOneStepCell的co原创 2021-08-15 22:39:24 · 244 阅读 · 0 评论 -
Pytorch多层全连接神经网络实现手写数字识别
一、库导入 import numpy as np import torch from torchvision.datasets import mnist # 导入 pytorch 内置的 mnist 数据 from torch import nn from torch.autograd import Variable from torch.utils.data import DataLoader ...原创 2019-11-05 22:07:02 · 963 阅读 · 0 评论 -
RuntimeError: running_mean should contain 10 elements not 20
torch.nn.Conv2d(in_channels, out_channels, kernel_size, stride=1, padding=0, dilation=1, groups=1, bias=True, padding_mode='zeros') 在卷积神经网络的卷积层之后总会添加BatchNorm2d进行数据的归一化处理,这使得数据在进行Relu之前不会因为数据过大而导致网络...原创 2019-11-03 18:32:17 · 10531 阅读 · 0 评论