Update activation test

This commit is contained in:
2024-04-21 14:00:43 +02:00
parent 942ee6a32b
commit 9a6152469a
4 changed files with 52 additions and 18 deletions

View File

@@ -1,6 +1,9 @@
import torchvision
import torch
import sys
from torchsummary import summary
sys.path.append('../../tools') # Ugly hack
from utils import export_model_weights, print_model_parameters
@@ -9,5 +12,9 @@ if __name__ == "__main__":
print_model_parameters(alexnet) # print layer names and number of parameters
export_model_weights(alexnet, 'alexnet_weights.bin')
print()
print(alexnet)
if torch.cuda.is_available():
alexnet.cuda()
summary(alexnet, (3, 227, 227))