from thop import profile
device = 'cuda:1'
model = Transformer().to(device)
input = torch.randn(1, 201, 192).to(device)
macs, params = profile(model, inputs=(input,))
print("macs\params:",macs,params)
欢迎分享,转载请注明来源:内存溢出
from thop import profile
device = 'cuda:1'
model = Transformer().to(device)
input = torch.randn(1, 201, 192).to(device)
macs, params = profile(model, inputs=(input,))
print("macs\params:",macs,params)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)