refactor: reorganize project structure by moving core modules and update import paths in API server
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import torch
|
||||
from pathlib import Path
|
||||
model = torch.load('cloud_removal_model/cloud_removal_unet_best.pth', map_location='cpu')
|
||||
print(type(model))
|
||||
print("hasattr inc:", hasattr(model, 'inc'))
|
||||
if hasattr(model, 'inc'):
|
||||
print("hasattr double_conv:", hasattr(model.inc, 'double_conv'))
|
||||
if hasattr(model.inc, 'double_conv'):
|
||||
print("in_channels:", model.inc.double_conv[0].in_channels)
|
||||
else:
|
||||
for name, param in model.named_parameters():
|
||||
print(name, param.shape)
|
||||
break
|
||||
Reference in New Issue
Block a user