Skip to content

Commit

Permalink
Merge pull request #273 from breezedeus/dev
Browse files Browse the repository at this point in the history
fix: export_to_onnx
  • Loading branch information
breezedeus authored Aug 10, 2023
2 parents 777ba68 + 02791a0 commit 7c21696
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ package:
rm -rf build
python setup.py sdist bdist_wheel

VERSION = 2.2.3.1
VERSION = 2.2.3.2
upload:
python -m twine upload dist/cnocr-$(VERSION)* --verbose

Expand Down
2 changes: 1 addition & 1 deletion cnocr/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
# specific language governing permissions and limitations
# under the License.

__version__ = '2.2.3.1'
__version__ = '2.2.3.2'
3 changes: 2 additions & 1 deletion cnocr/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
from cnocr.dataset import OcrDataModule
from cnocr.trainer import PlTrainer, resave_model
from cnocr import CnOcr, gen_model
from cnocr.recognizer import Recognizer

_CONTEXT_SETTINGS = {"help_option_names": ['-h', '--help']}
logger = set_logger(log_level=logging.INFO)
Expand Down Expand Up @@ -482,7 +483,7 @@ def resave_model_file(
def export_to_onnx(model_name, output_model_fp, input_model_fp=None):
import onnx

ocr = CnOcr(model_name, model_fp=input_model_fp)
ocr = Recognizer(model_name, model_fp=input_model_fp)
model = ocr._model

x = torch.randn(1, 1, 32, 280)
Expand Down

0 comments on commit 7c21696

Please sign in to comment.