def summary(Net): clf = Net(1, 10, in_ch=1, debug=True).to(device) data = torch.randn(32, 1, 32, 32).to(device) labels = torch.randint(0, 10, (32, )).to(device) clf(data, labels) print('Nb parameters: {}'.format(nb_parameters(clf)))
def summary(Net): clf = Net(10, in_ch=1, debug=True).to(device) clf(torch.randn(32, 1, 32, 32).to(device)) print('Nb parameters: {}'.format(nb_parameters(clf)))
def summary(Net): clf = Net(10, in_ch=CH, debug=True) clf(torch.randn(32, CH, 32, 32)) print('Nb parameters: {}'.format(nb_parameters(clf)))