Just like we have plot_model in keras, is there some way in pytorch by which model can be visualized?
I tried make_dot using:
batch = next(iter(dataloader_train))
yhat = model(batch.text) # Give dummy batch to forward().

from torchviz import make_dot

make_dot(yhat, params=dict(list(model.named_parameters()))).render("rnn_torchviz", format="png")

but this gives output that batch has no attribute ‘text’
Help?