You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use the exported escn_l6_m2_lay12_2M_s2ef_export_cuda_9182024.pt2 as a shared library using torch._export.aot_compile. I tried the naive attempt as following:
What is easiest way to convert this model to a .so file?
Also there seem to be a mismatch between escn_l6_m2_lay12_2M_s2ef.pt and escn_l6_m2_lay12_2M_s2ef_export_cuda_9182024.pt2. pt2 file lists number of parameters as
model = torch.export.load("escn_l6_m2_lay12_2M_s2ef_export_cuda_9182024.pt2")
torch.sum(torch.tensor([p.numel() for p in model.module().parameters() if p.requires_grad]))
>>> tensor(51869952)
but the escn_l6_m2_lay12_2M_s2ef.pt checkpoint only has 51852408 parameters.
ckpt = torch.load("escn_l6_m2_lay12_2M_s2ef.pt", map_location=torch.device("cpu"))
n_total = 0
for p in ckpt["state_dict"]:
n_total += ckpt["state_dict"][p].numel()
n_total
>>> 51852408
The text was updated successfully, but these errors were encountered:
What would you like to report?
I want to use the exported
escn_l6_m2_lay12_2M_s2ef_export_cuda_9182024.pt2
as a shared library usingtorch._export.aot_compile
. I tried the naive attempt as following:But i get the following error:
I tried different variations of it such as:
But i keep getting variations of above error with permutations of
arg_*
.What is easiest way to convert this model to a
.so
file?Also there seem to be a mismatch between
escn_l6_m2_lay12_2M_s2ef.pt
andescn_l6_m2_lay12_2M_s2ef_export_cuda_9182024.pt2
.pt2
file lists number of parameters asbut the
escn_l6_m2_lay12_2M_s2ef.pt
checkpoint only has 51852408 parameters.The text was updated successfully, but these errors were encountered: