Closed letmejoin closed 2 years ago
Hi @letmejoin, thank you for the suggestion! I'll try to implement it as soon as possible. Best, Alessio
z_grouped = torch.cat(test_z, dim=0).view(-1, c.n_transforms_test, c.n_feat) anomaly_score = t2np(torch.mean(z_grouped ** 2, dim=(-2, -1))) train.py line130, 131, when calculate the anomaly_score, much GPU memory needed. And this is can be solved by calculating along with every loop at line 109-112, and then merage the results when the loop is over.
Can you share the modified code,please~
It would be very useful if you could share your code, @letmejoin
I updated the code. Let me know if there are problems now @letmejoin @balablb
I updated the code. Let me know if there are problems now @balablb
oh, I will test your code as soon. Thks.
I updated the code. Let me know if there are problems now @letmejoin @balablb
it works ~
Thank you very much, I'll close the issue
z_grouped = torch.cat(test_z, dim=0).view(-1, c.n_transforms_test, c.n_feat) anomaly_score = t2np(torch.mean(z_grouped ** 2, dim=(-2, -1))) train.py line130, 131, when calculate the anomaly_score, much GPU memory needed. And this is can be solved by calculating along with every loop at line 109-112, and then merage the results when the loop is over.