Error in Tensorboard's(PyTorch) add_graph
I'm following this Pytorch's Tensorboard documentation.
I have the following code:
model = torchvision.models.resnet50(False)
writer.add_graph(model)

It throws the following error:

_ = model(*args)  # don't catch, just print the error message
TypeError: ResNet object argument after * must be an iterable, not NoneType

I don't know what I'm doing wrong here!

I had this problem too..

Passing an input_to_model parameter different from None solved the problem. However, I though it should be optional

dataiter = iter(trainloader)
images, labels = dataiter.next()
writer.add_graph(model, images)

