From d90c96e55e9e8bf6c75fe126e4d316110b397c90 Mon Sep 17 00:00:00 2001 From: James Betker Date: Wed, 2 Sep 2020 10:29:40 -0600 Subject: [PATCH] Fix greyscale injector --- codes/models/steps/injectors.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codes/models/steps/injectors.py b/codes/models/steps/injectors.py index 8effb6bf..1238eb88 100644 --- a/codes/models/steps/injectors.py +++ b/codes/models/steps/injectors.py @@ -101,5 +101,5 @@ class GreyInjector(Injector): def forward(self, state): mean = torch.mean(state[self.opt['in']], dim=1, keepdim=True) - mean = torch.repeat(mean, (-1, 3, -1, -1)) + mean = mean.repeat((1, 3, 1, 1)) return {self.opt['out']: mean}