Update engine.py
parent
2ab10a2d95
commit
ebfcc130bd
|
@ -378,6 +378,7 @@ class ExportModel(nn.Layer):
|
||||||
self.infer_output_key = config.get("infer_output_key", None)
|
self.infer_output_key = config.get("infer_output_key", None)
|
||||||
if self.infer_output_key == "features" and isinstance(self.base_model,
|
if self.infer_output_key == "features" and isinstance(self.base_model,
|
||||||
RecModel):
|
RecModel):
|
||||||
|
self.base_model.head = IdentityHead()
|
||||||
if config.get("infer_add_softmax", True):
|
if config.get("infer_add_softmax", True):
|
||||||
self.softmax = nn.Softmax(axis=-1)
|
self.softmax = nn.Softmax(axis=-1)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue