Skip to content

Commit

Permalink
delete some functions
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxsnczpku committed Dec 13, 2017
1 parent 799b6d3 commit 07e2c2b
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions basic_utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,6 @@ def turn_into_cuda(var):
return var.cuda() if use_cuda else var


def get_state_dict(file):
try:
pretrain_state_dict = torch.load(file)
except AssertionError:
pretrain_state_dict = torch.load(file, map_location=lambda storage, location: storage)
return pretrain_state_dict


def log_gamma(xx):
"""
The log gamma function.
Expand Down

0 comments on commit 07e2c2b

Please sign in to comment.