"tools/git@developer.sourcefind.cn:OpenDAS/openpcdet.git" did not exist on "76279ff212dfbf16fd06a6e4a51e9bca02304b02"
Commit 7b42d166 authored by Ben Graham's avatar Ben Graham Committed by GitHub
Browse files

Update networkInNetwork.py

parent 710c4ff0
...@@ -32,7 +32,7 @@ class NetworkInNetworkFunction(Function): ...@@ -32,7 +32,7 @@ class NetworkInNetworkFunction(Function):
@staticmethod @staticmethod
def backward(ctx, grad_output): def backward(ctx, grad_output):
grad_input=Variable(grad_output.data.new()) grad_input=Variable(grad_output.data.new())
grad_weight=Variable(grad_output.data.new().resize_as_(ctx.weight).zero()) grad_weight=Variable(grad_output.data.new().resize_as_(ctx.weight).zero_())
if ctx.bias is None: if ctx.bias is None:
grad_bias=None grad_bias=None
else: else:
...@@ -59,7 +59,8 @@ class NetworkInNetwork(Module): ...@@ -59,7 +59,8 @@ class NetworkInNetwork(Module):
0, 0,
std)) std))
if bias: if bias:
self.bias = Parameter(torch.Tensor(nOut).zero_()) self.bias = Parameter(torch.Tensor(nOut).
_())
else: else:
self.bias=None self.bias=None
def forward(self, input): def forward(self, input):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment