Skip to content

Commit

Permalink
Fix PSNR logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
tibuch committed Nov 4, 2021
1 parent a6bf7e4 commit 60fbe22
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fit/modules/TRecTransformerModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,9 @@ def test_step(self, batch, batch_idx):

def test_epoch_end(self, outputs):
outputs = torch.stack(outputs)
self.log('Mean PSNR', torch.mean(outputs).detach().cpu().numpy(), logger=True)
self.log('SEM PSNR', torch.std(outputs / np.sqrt(len(outputs))).detach().cpu().numpy(),
print(torch.mean(outputs).detach().cpu().numpy())
self.log('Mean PSNR', torch.mean(outputs), logger=True)
self.log('SEM PSNR', torch.std(outputs / np.sqrt(len(outputs))),
logger=True)

def get_imgs(self, x, fbp, y, amp_min, amp_max):
Expand Down

0 comments on commit 60fbe22

Please sign in to comment.