We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好!我在做RM的时候发现,conv输出进入BN输出有精度问题?
idconv1 = nn.Conv2d(self.in_planes, self.in_planes+self.mid_planes, kernel_size=3, stride=1, padding=1, bias=False).eval() idbn1 = nn.BatchNorm2d(self.in_planes+self.mid_planes).eval() # init dirac_ kernel weight, bias, mean var to idconv1 nn.init.dirac_(idconv1.weight.data[:self.in_planes]) bn_var_sqrt1 = torch.sqrt(self.running1.running_var + self.running1.eps) idbn1.weight.data[:self.in_planes] = bn_var_sqrt1 idbn1.bias.data[:self.in_planes] = self.running1.running_mean idbn1.running_mean.data[:self.in_planes] = self.running1.running_mean idbn1.running_var.data[:self.in_planes] = self.running1.running_var # init conv1 to idconv1 idconv1.weight.data[self.in_planes:] = self.conv1.weight.data idbn1.weight.data[self.in_planes:] = self.bn1.weight.data idbn1.bias.data[self.in_planes:] = self.bn1.bias.data idbn1.running_mean.data[self.in_planes:] = self.bn1.running_mean idbn1.running_var.data[self.in_planes:] = self.bn1.running_var
左边三conv2d输出结果,右边三batchnorm2d输出结果,其中conv2d输出为0的值在batchnorm2d中输出成一个很小的值(1.6642e-08),请问这是什么原因造成的?如何修改代码消除这种现象。
The text was updated successfully, but these errors were encountered:
您好!我在做RM的时候发现,conv输出进入BN输出有精度问题? 左边三conv2d输出结果,右边三batchnorm2d输出结果,其中conv2d输出为0的值在batchnorm2d中输出成一个很小的值(1.6642e-08),请问这是什么原因造成的?如何修改代码消除这种现象。
感谢关注RMNet,您所说的精度问题根据我的观察推测是由BN层引起的,按照使用场景:
Sorry, something went wrong.
理解了,谢谢!
No branches or pull requests
您好!我在做RM的时候发现,conv输出进入BN输出有精度问题?
左边三conv2d输出结果,右边三batchnorm2d输出结果,其中conv2d输出为0的值在batchnorm2d中输出成一个很小的值(1.6642e-08),请问这是什么原因造成的?如何修改代码消除这种现象。
The text was updated successfully, but these errors were encountered: