How to save model with .pt extension
How to save the trained Roberta model with .pt extension instead of .bin extension?
2020-12-06T06:12:50Z
Follow the steps mentionedhereor follow the code specified below.Creating the tracetraced_model = torch.jit.trace(model, [tokens_tensor, segments_tensors])
torch.jit.save(traced_model, "traced_bert.pt")