Also added tests to cover several pytorch related use cases.
The new API can be used as follows. I will update wiki after release next week:
# Assume the model explorer server has started at port 8080.
import model_explorer
# Prepare a pytorch model.
model = torchvision.models.mobilenet_v2().eval()
inputs = (torch.rand([1, 3, 224, 224]),)
ep = torch.export.export(model, inputs)
# Load it into the existing server.
model_explorer.visualize_pytorch('test pytorch', ep, reuse_server=True) # 👈
or:
import model_explorer
# Prepare a pytorch model.
model = torchvision.models.mobilenet_v2().eval()
inputs = (torch.rand([1, 3, 224, 224]),)
ep = torch.export.export(model, inputs)
# Load it into the existing server.
config.add_model_from_pytorch('torch test', ep).set_reuse_server() # 👈
model_explorer.visualize_from_config(config)
Also added tests to cover several pytorch related use cases.
The new API can be used as follows. I will update wiki after release next week:
or:
Fixes #231