Skip to content

Instantly share code, notes, and snippets.

View kenfehling's full-sized avatar
:octocat:

Ken Fehling kenfehling

:octocat:
View GitHub Profile
@kenfehling
kenfehling / summary.py
Last active July 17, 2018 09:36 — forked from kylemcdonald/summary.py
Pytorch model summary
from collections import OrderedDict
import torch as th
import torch.nn as nn
from torch.autograd import Variable
from torch.nn import Parameter
fmt = ' {:<20} {:>15} {:>15} {:>10}'
def stringify_shape(shape):