dlprimitives
dlprimitives copied to clipboard
Many warnings with perfomance testing. See solution below.
bash benchark_all.sh
/home/inetstar/Kamenev/programming/ZenDnn/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/inetstar/Kamenev/programming/ZenDnn/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=AlexNet_Weights.IMAGENET1K_V1`. You can also use `weights=AlexNet_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
alexnet
/home/inetstar/Kamenev/programming/ZenDnn/lib/python3.10/site-packages/torchvision/models/_utils.py:208: UserWarning: The parameter 'pretrained' is deprecated since 0.13 and may be removed in the future, please use 'weights' instead.
warnings.warn(
/home/inetstar/Kamenev/programming/ZenDnn/lib/python3.10/site-packages/torchvision/models/_utils.py:223: UserWarning: Arguments other than a weight enum or `None` for 'weights' are deprecated since 0.13 and may be removed in the future. The current behavior is equivalent to passing `weights=ResNet18_Weights.IMAGENET1K_V1`. You can also use `weights=ResNet18_Weights.DEFAULT` to get the most up-to-date weights.
warnings.warn(msg)
Solution:
diff --git a/tools/validate_network.py b/tools/validate_network.py
index 8825eed..ef8e1ff 100644
--- a/tools/validate_network.py
+++ b/tools/validate_network.py
@@ -206,7 +206,7 @@ def get_config():
def main(args):
- m = getattr(torchvision.models,args.model)(pretrained = True)
+ m = getattr(torchvision.models,args.model)(weights="IMAGENET1K_V1")
#print("Mean",m.bn1.running_mean.tolist()[:4])
#print("Var",m.bn1.running_var.tolist()[:4])
#print("W",m.bn1.weight.tolist()[:4])