Upload model.py
Browse files
model.py
CHANGED
@@ -168,10 +168,14 @@ def main():
|
|
168 |
|
169 |
print(f"Created dynamic PyTorch model with sections: {list(model.sections.keys())}")
|
170 |
|
|
|
|
|
|
|
171 |
first_section = next(iter(model.sections.keys()))
|
172 |
first_layer = model.sections[first_section][0]
|
173 |
input_features = first_layer[0].in_features
|
174 |
|
|
|
175 |
sample_input = torch.randn(1, input_features)
|
176 |
output = model(sample_input)
|
177 |
print(f"Sample output shape: {output.shape}")
|
|
|
168 |
|
169 |
print(f"Created dynamic PyTorch model with sections: {list(model.sections.keys())}")
|
170 |
|
171 |
+
# Print the model architecture
|
172 |
+
print(model)
|
173 |
+
|
174 |
first_section = next(iter(model.sections.keys()))
|
175 |
first_layer = model.sections[first_section][0]
|
176 |
input_features = first_layer[0].in_features
|
177 |
|
178 |
+
# Ensure the input tensor size matches the expected input size
|
179 |
sample_input = torch.randn(1, input_features)
|
180 |
output = model(sample_input)
|
181 |
print(f"Sample output shape: {output.shape}")
|