Hugging Face
Models
Datasets
Spaces
Posts
Docs
Enterprise
Pricing
Log In
Sign Up
Spaces:
tsinghua-fib-lab
/
MFLP
like
4
Runtime error
App
Files
Files
Community
1
Fetching metadata from the HF Docker repository...
refs/pr/1
MFLP
/
test_model.py
苏泓源
test
ef007f9
12 months ago
raw
Copy download link
history
blame
Safe
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)