Skip to content
This repository has been archived by the owner on Nov 28, 2023. It is now read-only.

Commit

Permalink
add model summary
Browse files Browse the repository at this point in the history
  • Loading branch information
LilySnow committed May 13, 2019
1 parent 43c2a15 commit cf29ab0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions deeprank/learn/NeuralNet.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import matplotlib.ticker as mtick
import numpy as np
from torchsummary import summary
import pdb # xue


import torch
Expand Down Expand Up @@ -204,7 +203,7 @@ def __init__(self,data_set,model,
device = torch.device("cuda") # PyTorch v0.4.0
else:
device = torch.device("cpu")
summary(self.net.to(device), self.data_set.input_shape)
summary(self.net.to(device), self.data_set.input_shape, device = device.type)
sys.stdout.flush()

# load parameters of pretrained model if provided
Expand Down

0 comments on commit cf29ab0

Please sign in to comment.