1 Star 0 Fork 1

futureflsl/CRNN_TensorFlow2

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
configuration.py 872 Bytes
一键复制 编辑 原始数据 按行查看 历史
calmisential 提交于 2020-06-20 12:54 . Fix
class Config:
EPOCHS = 50
BATCH_SIZE = 2
IMAGE_HEIGHT = 32
IMAGE_WIDTH = 100
IAMGE_CHANNELS = 3
save_model_dir = "saved_model/"
save_frequency = 10
test_picture_path = ""
# dataset
dataset_images = ""
dataset_label = ""
train_ratio = 0.6
valid_ratio = 0.2
train_label = ""
valid_label = ""
test_label = ""
charset_file = ""
@classmethod
def get_idx2char(cls):
with open(file=cls.charset_file, mode="r", encoding="utf-8") as f:
char_list = f.readlines()
idx2char = dict((i, c.strip("\n")) for i, c in enumerate(char_list))
idx2char[len(char_list)] = "BLANK"
return idx2char
@classmethod
def get_char2idx(cls):
idx2char = cls.get_idx2char()
char2idx = dict((v, k) for k, v in idx2char.items())
return char2idx
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/futureflsl/CRNN_TensorFlow2.git
git@gitee.com:futureflsl/CRNN_TensorFlow2.git
futureflsl
CRNN_TensorFlow2
CRNN_TensorFlow2
master

搜索帮助