Reformat python files

This commit is contained in:
2024-05-30 19:31:28 +02:00
parent 229929a464
commit 09e64f8037
2 changed files with 7 additions and 33 deletions

View File

@@ -1,16 +1,15 @@
import torchvision
import sys
sys.path.append('../../tools') # Ugly hack
from utils import export_model_weights, print_model_parameters, predict
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 = torchvision.models.inception_v3(
weights=torchvision.models.Inception_V3_Weights.DEFAULT
)
inception.eval()
# print_model_parameters(inception) # print layer names and number of parameters
# export_model_weights(inception, 'inception_v3_weights.bin')
print(predict(inception, "./margot.jpg"))
print_model_parameters(inception) # print layer names and number of parameters
export_model_weights(inception, "inception_v3_weights.bin")