Update inception py

This commit is contained in:
2024-05-30 13:19:11 +02:00
parent fcd7d96126
commit da95fa203e

View File

@@ -1,17 +1,14 @@
import torch
import torchvision
import sys
from torchsummary import summary
inception = torchvision.models.inception_v3(weights=torchvision.models.Inception_V3_Weights.DEFAULT)
inception.eval()
sys.path.append('../../tools') # Ugly hack
from utils import export_model_weights, print_model_parameters
if __name__ == "__main__":
inception = torchvision.models.inception_v3(weights=torchvision.models.Inception_V3_Weights.DEFAULT)
inception.eval()
print_model_parameters(inception) # print layer names and number of parameters
inception.cuda()
summary(inception, (3, 299, 299))
export_model_weights(inception, 'inception_v3_weights.bin')