Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when i tested some images by the code, the usage is getting bigger #31

Open
leolv131 opened this issue Nov 22, 2021 · 0 comments
Open

Comments

@leolv131
Copy link

when i tested some images by the code, the usage is getting bigger。 I find the problem is caused by the line code(features = self(x)):
def test_step(self, batch, batch_idx): # Nearest Neighbour Search
self.embedding_coreset = pickle.load(open(os.path.join(self.embedding_dir_path, 'embedding.pickle'), 'rb'))
x, gt, label, file_name, x_type = batch
# extract embedding
features = self(x)
embeddings = []
for feature in features:
m = torch.nn.AvgPool2d(3, 1, 1)
embeddings.append(m(feature))
I used torch.no_gard() and torch.cuda.empty_cache(), but it is unuseful. why?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant