19462c9a66831742f2168b0ae6c2b217bc08854f,calamari_ocr/ocr/trainer.py,CalamariTrainer,train,#CalamariTrainer#Any#,47

Before Change



                // checks
                if checkpoint_params.model.line_height != network_params.features:
                    raise Exception("The model to restore has a line height of {} but a line height of {} is requested".format(
                        network_params.features, checkpoint_params.model.line_height
                    ))

                // create codec of the same type
                restore_codec = codec.__class__(restore_model_params.codec.charset)

After Change



            // checks
            if data.params().line_height_ != restore_data_params["line_height_"]:
                raise Exception(f"The model to restore has a line height of {restore_data_params.line_height_}"
                                f" but a line height of {data.params().line_height_} is requested")

            // create codec of the same type
            restore_codec = codec.__class__(restore_data_params["codec"]["charset"])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 6

Instances


Project Name: Calamari-OCR/calamari
Commit Name: 19462c9a66831742f2168b0ae6c2b217bc08854f
Time: 2021-01-19
Author: wick.chr@gmail.com
File Name: calamari_ocr/ocr/trainer.py
Class Name: CalamariTrainer
Method Name: train


Project Name: catalyst-team/catalyst
Commit Name: 450b907b25d98be9cb37da9672e772a1a198bb6a
Time: 2019-06-24
Author: scitator@gmail.com
File Name: catalyst/dl/callbacks/checkpoint.py
Class Name: CheckpointCallback
Method Name: load_checkpoint


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: b3d98d6b8b300e23e1b4900af3bb476075d3fa62
Time: 2021-03-31
Author: liubrandon@google.com
File Name: perfkitbenchmarker/linux_benchmarks/redis_benchmark.py
Class Name:
Method Name: RunLoad


Project Name: pantsbuild/pants
Commit Name: 66446d65d0713d637919d204e41a73731567340c
Time: 2019-10-08
Author: ericarellano@me.com
File Name: tests/python/pants_test/projects/test_testprojects_integration.py
Class Name: TestProjectsIntegrationTest
Method Name: targets_for_shard


Project Name: pantsbuild/pants
Commit Name: 4854194228479273a8c86016062d3558321eabec
Time: 2019-07-24
Author: ericarellano@me.com
File Name: tests/python/pants_test/engine/test_scheduler.py
Class Name:
Method Name: fn_raises