Closed ccl-private closed 3 years ago
the official example of PyTorch failed.
Hi,
The make_dot function expects either a Tensor or a tuple of Tensors as input. You're giving it a list of dictionaries right now.
thank you~
I'm sorry for necrobump. My problem is relevant I'm training SSD model for object detection, which outputs dictionary like:
{
"boxes": [],
"scores": [],
"labels": [],
}
How I can visualize this model? The problem is same:
TypeError: unhashable type: 'list'
import torch import torchvision from torchviz import make_dot
model = torchvision.models.detection.retinanet_resnet50_fpn(pretrained=True) model = model model.eval() x = [torch.rand(3, 300, 400)] predictions = model(x) print(predictions)
g = make_dot(predictions) g.render('espnet_model', view=False)