Skip to content
Snippets Groups Projects
Commit f39e9c11 authored by Neta Zmora's avatar Neta Zmora
Browse files

utils.py: remove unused code

Remove function to_var() which is not used by any code.
parent aacc1f33
No related branches found
No related tags found
No related merge requests found
...@@ -30,12 +30,6 @@ def to_np(var): ...@@ -30,12 +30,6 @@ def to_np(var):
return var.data.cpu().numpy() return var.data.cpu().numpy()
def to_var(tensor, cuda=True):
if cuda and torch.cuda.is_available():
tensor = tensor.cuda()
return Variable(tensor)
def size2str(torch_size): def size2str(torch_size):
if isinstance(torch_size, torch.Size): if isinstance(torch_size, torch.Size):
return size_to_str(torch_size) return size_to_str(torch_size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment