MFLP / test_model.py
苏泓源
test
ef007f9
raw
history blame
245 Bytes
import torch
import numpy as np
from model import Net
a = np.arange(100).reshape(1, 100)
model = Net(100, 50, 10)
model.load_state_dict(torch.load('model.pth'))
model.eval()
output = model(torch.from_numpy(a).float())
print(output)