js-pytorch icon indicating copy to clipboard operation
js-pytorch copied to clipboard

Loading .pt model weights

Open StudyingLover opened this issue 4 months ago • 0 comments

Describe the Feature

I have trained a PyTorch model, and I want to directly load this model and run inference in a browser. However, the current method for loading the weights requires defining the model first.

Motivation [optional]

No response

Sample Code

for example

const { torch } = require("js-pytorch");

const model = torch.load("model.pth")

Would you like to work on this issue?

None

StudyingLover avatar Oct 12 '24 02:10 StudyingLover