forked from mrq/DL-Art-School
Fix greyscale injector
This commit is contained in:
parent
8b52d46847
commit
d90c96e55e
|
@ -101,5 +101,5 @@ class GreyInjector(Injector):
|
||||||
|
|
||||||
def forward(self, state):
|
def forward(self, state):
|
||||||
mean = torch.mean(state[self.opt['in']], dim=1, keepdim=True)
|
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}
|
return {self.opt['out']: mean}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user