Skip to content

Commit

Permalink
errors reslved
Browse files Browse the repository at this point in the history
  • Loading branch information
siddsax committed Nov 17, 2018
1 parent 4898c16 commit a7214c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion utils/data_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def load_data_and_labels(data, M=0, N=0):
#y_te = y_te.resize((np.shape(y_te)[0], np.shape(y_tr)[1]))
Y = sp.csr_matrix((val_idx, (row_idx, col_idx)), shape=(m, N))
elif(N < n):
Y = sp.csr_matrix((val_idx, (row_idx, col_idx)), shape=(m, N))
Y = sp.csr_matrix((val_idx, (row_idx, col_idx)), shape=(m, n))
Y = Y[:, :N]
else:
Y = sp.csr_matrix((val_idx, (row_idx, col_idx)), shape=(m, n))
Expand Down
4 changes: 2 additions & 2 deletions utils/futils.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def load_model(model, name, optimizer=None):
return model

def save_model(model, optimizer, epoch, name):
if not os.path.exists('saved_models/' + name):
os.makedirs('saved_models/' + name)


checkpoint = {
'state_dict': model.state_dict(),
'optimizer': optimizer.state_dict(),
Expand Down

0 comments on commit a7214c4

Please sign in to comment.