release commit
[jacinto-ai/pytorch-jacinto-ai-devkit.git] / modules / pytorch_jacinto_ai / vision / models / shufflenetv2.py
index 806528bea8ef82f0472b5ecedd6c6b00567d25db..be529d6a775bcfef4fbee7ebc62933de95c12a5b 100644 (file)
@@ -1,3 +1,4 @@
+from collections import OrderedDict
 import torch
 import torch.nn as nn
 from .utils import load_state_dict_from_url
@@ -119,7 +120,7 @@ class ShuffleNetV2(nn.Module):
             nn.ReLU(inplace=True),
         )
         layers += [('conv5',conv5)]
-        self.features = torch.nn.Sequential(layers)
+        self.features = torch.nn.Sequential(OrderedDict(layers))
 
         if self.num_classes is not None:
             self.classifier = nn.Linear(output_channels, num_classes)