diff --git a/kraken/lib/vgsl.py b/kraken/lib/vgsl.py index 745dda816..85e04ea47 100644 --- a/kraken/lib/vgsl.py +++ b/kraken/lib/vgsl.py @@ -411,7 +411,7 @@ def _serialize_layer(net, input, net_builder): mlmodel.short_description = 'kraken model' mlmodel.user_defined_metadata['vgsl'] = '[' + ' '.join(self.named_spec) + ']' if self.codec: - mlmodel.user_defined_metadata['codec'] = json.dumps({'type': 'SentencePiece', 'spp': self.spp.serialized_model_proto()}) + mlmodel.user_defined_metadata['codec'] = json.dumps({'type': 'SentencePiece', 'spp': self.codec.spp.serialized_model_proto()}) if self.user_metadata: mlmodel.user_defined_metadata['kraken_meta'] = json.dumps(self.user_metadata) if self.aux_layers: