From 0a4217e4ce86d0662148c9bb4688b366f8567c53 Mon Sep 17 00:00:00 2001 From: Kai Arulkumaran Date: Wed, 2 Aug 2017 14:23:39 +0100 Subject: [PATCH] Change "gain" -> "calculate_gain" Fixes https://github.com/pytorch/examples/pull/189#event-1175241921 --- super_resolution/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/super_resolution/model.py b/super_resolution/model.py index 4e28ba3063..7a7de30efa 100644 --- a/super_resolution/model.py +++ b/super_resolution/model.py @@ -24,7 +24,7 @@ def forward(self, x): return x def _initialize_weights(self): - init.orthogonal(self.conv1.weight, init.gain('relu')) - init.orthogonal(self.conv2.weight, init.gain('relu')) - init.orthogonal(self.conv3.weight, init.gain('relu')) + init.orthogonal(self.conv1.weight, init.calculate_gain('relu')) + init.orthogonal(self.conv2.weight, init.calculate_gain('relu')) + init.orthogonal(self.conv3.weight, init.calculate_gain('relu')) init.orthogonal(self.conv4.weight)