上传者: 38640473
|
上传时间: 2021-12-21 16:54:39
|
文件大小: 43KB
|
文件类型: -
如下所示:
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