如下所示:
import io
import torch
import torch.onnx
from models.C3AEModel import PlainC3AENetCBAM
device = torch.device(cuda:0 if torch.cuda.is_available() else cpu)
def test():
model = PlainC3AENetCBAM()
pthfile = r'/home/joy/Projects/models/emotion/PlainC3AENet.pth'
loaded_model = torch.load
2021-12-21 16:54:39
43KB
c
nx
OR
1