From f39e9c11cc751d8bcc1f59acd7361b8556ad1028 Mon Sep 17 00:00:00 2001 From: Neta Zmora <neta.zmora@intel.com> Date: Wed, 3 Oct 2018 20:09:15 +0300 Subject: [PATCH] utils.py: remove unused code Remove function to_var() which is not used by any code. --- distiller/utils.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/distiller/utils.py b/distiller/utils.py index f803d17..13d1f4a 100755 --- a/distiller/utils.py +++ b/distiller/utils.py @@ -30,12 +30,6 @@ def to_np(var): 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): if isinstance(torch_size, torch.Size): return size_to_str(torch_size) -- GitLab