Fix geometric loss not handling 0 index

This commit is contained in:
James Betker 2020-10-04 21:05:01 -06:00
parent c3ef8a4a31
commit a890e3a9c0

View File

@ -316,7 +316,7 @@ class TranslationInvarianceLoss(ConfigurableLoss):
trans_output = net(*input)
else:
trans_output = net(*input)
if self.gen_output_to_use:
if self.gen_output_to_use is not None:
fake_shared_output = trans_output[self.gen_output_to_use][:, :, hl:hh, wl:wh]
else:
fake_shared_output = trans_output[:, :, hl:hh, wl:wh]