Handle tuple-returning generators in test
This commit is contained in:
parent
f994466289
commit
62a97c53d1
|
@ -55,6 +55,9 @@ if __name__ == "__main__":
|
||||||
model.feed_data(data, need_GT=need_GT)
|
model.feed_data(data, need_GT=need_GT)
|
||||||
model.test()
|
model.test()
|
||||||
|
|
||||||
|
if isinstance(model.fake_H, tuple):
|
||||||
|
visuals = model.fake_H[0].detach().float().cpu()
|
||||||
|
else:
|
||||||
visuals = model.fake_H.detach().float().cpu()
|
visuals = model.fake_H.detach().float().cpu()
|
||||||
for i in range(visuals.shape[0]):
|
for i in range(visuals.shape[0]):
|
||||||
img_path = data['GT_path'][i] if need_GT else data['LQ_path'][i]
|
img_path = data['GT_path'][i] if need_GT else data['LQ_path'][i]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user