@@ -112,7 +112,8 @@ def load_weights(self, base_file):
112112 other , ext = os .path .splitext (base_file )
113113 if ext == '.pkl' or '.pth' :
114114 print ('Loading weights into state dict...' )
115- self .load_state_dict (torch .load (base_file , map_location = lambda storage , loc : storage ))
115+ self .load_state_dict (torch .load (base_file ,
116+ map_location = lambda storage , loc : storage ))
116117 print ('Finished!' )
117118 else :
118119 print ('Sorry only .pth and .pkl files supported.' )
@@ -199,7 +200,7 @@ def build_ssd(phase, size=300, num_classes=21):
199200 if size != 300 :
200201 print ("Error: Sorry only SSD300 is supported currently!" )
201202 return
202- base_ ,extras_ ,head_ = multibox (vgg (base [str (size )], 3 ),
203- add_extras (extras [str (size )], 1024 ),
204- mbox [str (size )], num_classes )
205- return SSD (phase ,base_ ,extras_ ,head_ , num_classes )
203+ base_ , extras_ , head_ = multibox (vgg (base [str (size )], 3 ),
204+ add_extras (extras [str (size )], 1024 ),
205+ mbox [str (size )], num_classes )
206+ return SSD (phase , base_ , extras_ , head_ , num_classes )
0 commit comments