Skip to content

Commit

Permalink
Merge pull request #256 from lsgrep/fix-embedding-config
Browse files Browse the repository at this point in the history
fix embedding config
  • Loading branch information
BrikerMan authored Sep 30, 2019
2 parents fc7d089 + 6c9c22e commit 7eddb47
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion kashgari/embeddings/base_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
# time: 2019-05-20 17:40

import json
import pydoc
import logging
import pydoc
from typing import Union, List, Optional, Dict

import numpy as np
Expand All @@ -33,6 +33,7 @@ def info(self) -> Dict:
'config': {
'sequence_length': self.sequence_length,
'embedding_size': self.embedding_size,
'task': self.task
},
'embed_model': json.loads(self.embed_model.to_json()),
}
Expand Down
2 changes: 1 addition & 1 deletion kashgari/processors/classification_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, multi_label=False, **kwargs):
def info(self):
info = super(ClassificationProcessor, self).info()
info['task'] = kashgari.CLASSIFICATION
info['multi_label'] = self.multi_label
info['config']['multi_label'] = self.multi_label
return info

def _build_label_dict(self,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,4 @@ def find_version(*file_paths):
)

if __name__ == "__main__":
print("Hello world")
print("Hello world")

0 comments on commit 7eddb47

Please sign in to comment.