Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
a7660331a
tesseract
提交
39b168a0
T
tesseract
项目概览
a7660331a
/
tesseract
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
tesseract
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
39b168a0
编写于
8月 02, 2017
作者:
R
Ray Smith
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Removed errors introduced by git merge
上级
4e9665de
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
1 addition
and
13 deletion
+1
-13
lstm/lstmtrainer.cpp
lstm/lstmtrainer.cpp
+1
-5
lstm/lstmtrainer.h
lstm/lstmtrainer.h
+0
-5
training/lstmtraining.cpp
training/lstmtraining.cpp
+0
-3
未找到文件。
lstm/lstmtrainer.cpp
浏览文件 @
39b168a0
...
...
@@ -128,9 +128,6 @@ bool LSTMTrainer::TryLoadingCheckpoint(const char* filename,
GenericVector
<
char
>
data
;
if
(
!
(
*
file_reader_
)(
filename
,
&
data
))
return
false
;
tprintf
(
"Loaded file %s, unpacking...
\n
"
,
filename
);
<<<<<<<
Updated
upstream
return
checkpoint_reader_
->
Run
(
data
,
this
);
=======
if
(
!
checkpoint_reader_
->
Run
(
data
,
this
))
return
false
;
StaticShape
shape
=
network_
->
OutputShape
(
network_
->
InputShape
());
if
(((
old_traineddata
==
nullptr
||
*
old_traineddata
==
'\0'
)
&&
...
...
@@ -161,7 +158,6 @@ bool LSTMTrainer::TryLoadingCheckpoint(const char* filename,
network_
->
RemapOutputs
(
old_recoder
.
code_range
(),
code_map
);
tprintf
(
"Previous null char=%d mapped to %d
\n
"
,
old_null_char
,
null_char_
);
return
true
;
>>>>>>>
Stashed
changes
}
// Initializes the trainer with a network_spec in the network description
...
...
@@ -954,7 +950,7 @@ STRING LSTMTrainer::DumpFilename() const {
STRING
filename
;
filename
.
add_str_double
(
model_base_
.
string
(),
best_error_rate_
);
filename
.
add_str_int
(
"_"
,
best_iteration_
);
filename
+=
".
lstm
"
;
filename
+=
".
checkpoint
"
;
return
filename
;
}
...
...
lstm/lstmtrainer.h
浏览文件 @
39b168a0
...
...
@@ -98,15 +98,10 @@ class LSTMTrainer : public LSTMRecognizer {
virtual
~
LSTMTrainer
();
// Tries to deserialize a trainer from the given file and silently returns
<<<<<<<
Updated
upstream
// false in case of failure.
bool
TryLoadingCheckpoint
(
const
char
*
filename
);
=======
// false in case of failure. If old_traineddata is not null, then it is
// assumed that the character set is to be re-mapped from old_traininddata to
// the new, with consequent change in weight matrices etc.
bool
TryLoadingCheckpoint
(
const
char
*
filename
,
const
char
*
old_traineddata
);
>>>>>>>
Stashed
changes
// Initializes the character set encode/decode mechanism directly from a
// previously setup traineddata containing dawgs, UNICHARSET and
...
...
training/lstmtraining.cpp
浏览文件 @
39b168a0
...
...
@@ -57,11 +57,8 @@ BOOL_PARAM_FLAG(debug_network, false,
INT_PARAM_FLAG
(
max_iterations
,
0
,
"If set, exit after this many iterations"
);
STRING_PARAM_FLAG
(
traineddata
,
""
,
"Combined Dawgs/Unicharset/Recoder for language model"
);
<<<<<<<
Updated
upstream
=======
STRING_PARAM_FLAG
(
old_traineddata
,
""
,
"Previous traineddata arg when changing the character set"
);
>>>>>>>
Stashed
changes
// Number of training images to train between calls to MaintainCheckpoints.
const
int
kNumPagesPerBatch
=
100
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录