From 020f1f78b6ca01c55364c737b11d944ac1d81125 Mon Sep 17 00:00:00 2001 From: peterzhang2029 Date: Fri, 27 Oct 2017 15:47:44 +0800 Subject: [PATCH] rename the model config file --- scene_text_recognition/infer.py | 2 +- scene_text_recognition/{model.py => network_conf.py} | 7 +++++-- scene_text_recognition/train.py | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) rename scene_text_recognition/{model.py => network_conf.py} (94%) diff --git a/scene_text_recognition/infer.py b/scene_text_recognition/infer.py index c572f500..64bc4dde 100644 --- a/scene_text_recognition/infer.py +++ b/scene_text_recognition/infer.py @@ -2,7 +2,7 @@ import click import gzip import paddle.v2 as paddle -from model import Model +from network_conf import Model from reader import DataGenerator from decoder import ctc_greedy_decoder from utils import get_file_list, load_dict, load_reverse_dict diff --git a/scene_text_recognition/model.py b/scene_text_recognition/network_conf.py similarity index 94% rename from scene_text_recognition/model.py rename to scene_text_recognition/network_conf.py index 4fb297a5..bd92bae8 100644 --- a/scene_text_recognition/model.py +++ b/scene_text_recognition/network_conf.py @@ -13,7 +13,8 @@ class Model(object): :type num_classes: int :param shape: The size of the input images. :type shape: tuple of 2 int - :param is_infer: For inference or not + :param is_infer: The boolean parameter indicating + inferring or training. :type shape: bool ''' self.num_classes = num_classes @@ -90,11 +91,13 @@ class Model(object): def conv_groups(self, input, num, with_bn): ''' + Get the image features with image convolution group. + :param input: Input layer. :type input: LayerOutput :param num: Number of the filters. :type num: int - :param with_bn: Whether with batch normalization. + :param with_bn: Use batch normalization or not. :type with_bn: bool ''' assert num % 4 == 0 diff --git a/scene_text_recognition/train.py b/scene_text_recognition/train.py index 4497bee8..79eccc0b 100644 --- a/scene_text_recognition/train.py +++ b/scene_text_recognition/train.py @@ -4,7 +4,7 @@ import click import paddle.v2 as paddle from config import TrainerConfig as conf -from model import Model +from network_conf import Model from reader import DataGenerator from utils import get_file_list, build_label_dict, load_dict -- GitLab