Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion torchsummary/torchsummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import numpy as np


def summary(model, input_size, batch_size=-1, device="cuda"):
def summary(model, input_size, batch_size=-1, device="cuda", force_dtype=None):

def register_hook(module):

Expand Down Expand Up @@ -51,6 +51,8 @@ def hook(module, input, output):
dtype = torch.cuda.FloatTensor
else:
dtype = torch.FloatTensor
if force_dtype:
dtype = force_dtype

# multiple inputs to the network
if isinstance(input_size, tuple):
Expand Down