Closed jyfei-An closed 2 years ago
How did you do it?
You can call the set_swish function of the EfficientNet model.
my code:
if 'efficientnet' in backbone: if pretrained: self.model = EfficientNet.from_pretrained(backbone, num_classes=num_outputs) else: self.model = EfficientNet.from_name(backbone, override_params={'num_classes': num_outputs}) self.model.set_swish(memory_efficient=False) self.model._fc = OutputLayer(self.model._fc, extra_outputs)
Thank you for your reply :) I'm trying to convert the model to onnx format to deploy in jetson nano.
Excuse me, plz tell me how to from pt convert onnx model? I cannot creat it. Thank you.
I want to use the following code to convert the model to onnx format, but it fails, I want to ask if it supports conversion, and if so how to convert it
dummy_input = torch.randn(images.shape) torch.onnx.export(model, dummy_input, "./polylanenet.onnx", verbose=True)
failed imformation: RuntimeError: ONNX export failed: Couldn't export Python operator SwishImplementation