jinyeom/d2rt

models files

Opened this issue · 0 comments

Could you please give me the files in models?
cfg.MODEL.WEIGHTS = "models/model_final_5bd44e.pkl"
I put my weight on it,i run export_retinanet_onnx.ipynb,but it's always wrong,


ModuleAttributeError Traceback (most recent call last)
in ()
8 opset_version=9,
9 verbose=True,
---> 10 simplify=True,
11 )

/media/veilytech/work/Wendu/d2rt-master/utils/deploy.py in deploy(model, path, input_shape, input_names, output_names, opset_version, verbose, simplify)
62 # export the RetinaNet model as an ONNX file
63 assert len(input_shape) == 4, "input_shape must be (N, C, H, W)"
---> 64 wrapped_model = _RetinaNet(model).eval().to(model.device)
65 dummy_input = torch.rand(input_shape).to(wrapped_model.device)
66 torch.onnx.export(

/media/veilytech/work/Wendu/d2rt-master/utils/deploy.py in init(self, model)
32 self.head = model.head
33 self.anchor_generator = model.anchor_generator
---> 34 self.in_features = model.in_features
35 self.num_classes = model.num_classes
36 self.device = model.device

~/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py in getattr(self, name)
777 return modules[name]
778 raise ModuleAttributeError("'{}' object has no attribute '{}'".format(
--> 779 type(self).name, name))
780
781 def setattr(self, name: str, value: Union[Tensor, 'Module']) -> None:

ModuleAttributeError: 'RetinaNet' object has no attribute 'in_features'

I want to run through the whole code,thanks!