This commit is contained in:
harisreedhar
2025-03-11 14:43:03 +01:00
committed by henryruhs
parent b7e2d3ccd7
commit 2ed558a873
10 changed files with 310 additions and 286 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ from os import makedirs
import torch
from .generator import AdaptiveEmbeddingIntegrationNetwork
from .models.generator import AdaptiveEmbeddingIntegrationNetwork
CONFIG = configparser.ConfigParser()
CONFIG.read('config.ini')
@@ -17,7 +17,7 @@ def export() -> None:
makedirs(directory_path, exist_ok = True)
state_dict = torch.load(source_path, map_location = 'cpu').get('state_dict').get('generator')
model = AdaptiveEmbeddingIntegrationNetwork(512, 2)
model = AdaptiveEmbeddingIntegrationNetwork()
model.load_state_dict(state_dict)
model.eval()
source_tensor = torch.randn(1, 512)