You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: