Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleOCR
提交
2059a5a2
P
PaddleOCR
项目概览
PaddlePaddle
/
PaddleOCR
大约 1 年 前同步成功
通知
1518
Star
32962
Fork
6643
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
108
列表
看板
标记
里程碑
合并请求
7
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
108
Issue
108
列表
看板
标记
里程碑
合并请求
7
合并请求
7
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2059a5a2
编写于
12月 20, 2021
作者:
文幕地方
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add num_workers to args
上级
8e05d54c
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
12 addition
and
6 deletion
+12
-6
ppstructure/vqa/README.md
ppstructure/vqa/README.md
+5
-0
ppstructure/vqa/eval_re.py
ppstructure/vqa/eval_re.py
+1
-1
ppstructure/vqa/eval_ser.py
ppstructure/vqa/eval_ser.py
+1
-1
ppstructure/vqa/train_re.py
ppstructure/vqa/train_re.py
+2
-2
ppstructure/vqa/train_ser.py
ppstructure/vqa/train_ser.py
+2
-2
ppstructure/vqa/utils.py
ppstructure/vqa/utils.py
+1
-0
未找到文件。
ppstructure/vqa/README.md
浏览文件 @
2059a5a2
...
@@ -165,6 +165,7 @@ python3.7 train_ser.py \
...
@@ -165,6 +165,7 @@ python3.7 train_ser.py \
--learning_rate
5e-5
\
--learning_rate
5e-5
\
--warmup_steps
50
\
--warmup_steps
50
\
--evaluate_during_training
\
--evaluate_during_training
\
--num_workers
8
\
--seed
2048
\
--seed
2048
\
--resume
--resume
```
```
...
@@ -177,6 +178,7 @@ python3 eval_ser.py \
...
@@ -177,6 +178,7 @@ python3 eval_ser.py \
--eval_data_dir
"XFUND/zh_val/image"
\
--eval_data_dir
"XFUND/zh_val/image"
\
--eval_label_path
"XFUND/zh_val/xfun_normalize_val.json"
\
--eval_label_path
"XFUND/zh_val/xfun_normalize_val.json"
\
--per_gpu_eval_batch_size
8
\
--per_gpu_eval_batch_size
8
\
--num_workers
8
\
--output_dir
"output/ser/"
\
--output_dir
"output/ser/"
\
--seed
2048
--seed
2048
```
```
...
@@ -234,6 +236,7 @@ python3 train_re.py \
...
@@ -234,6 +236,7 @@ python3 train_re.py \
--warmup_steps
50
\
--warmup_steps
50
\
--per_gpu_train_batch_size
8
\
--per_gpu_train_batch_size
8
\
--per_gpu_eval_batch_size
8
\
--per_gpu_eval_batch_size
8
\
--num_workers
8
\
--evaluate_during_training
\
--evaluate_during_training
\
--seed
2048
--seed
2048
...
@@ -257,6 +260,7 @@ python3 train_re.py \
...
@@ -257,6 +260,7 @@ python3 train_re.py \
--warmup_steps
50
\
--warmup_steps
50
\
--per_gpu_train_batch_size
8
\
--per_gpu_train_batch_size
8
\
--per_gpu_eval_batch_size
8
\
--per_gpu_eval_batch_size
8
\
--num_workers
8
\
--evaluate_during_training
\
--evaluate_during_training
\
--seed
2048
\
--seed
2048
\
--resume
--resume
...
@@ -276,6 +280,7 @@ python3 eval_re.py \
...
@@ -276,6 +280,7 @@ python3 eval_re.py \
--label_map_path
'labels/labels_ser.txt'
\
--label_map_path
'labels/labels_ser.txt'
\
--output_dir
"output/re_test/"
\
--output_dir
"output/re_test/"
\
--per_gpu_eval_batch_size
8
\
--per_gpu_eval_batch_size
8
\
--num_workers
8
\
--seed
2048
--seed
2048
```
```
最终会打印出
`precision`
,
`recall`
,
`f1`
等指标
最终会打印出
`precision`
,
`recall`
,
`f1`
等指标
...
...
ppstructure/vqa/eval_re.py
浏览文件 @
2059a5a2
...
@@ -112,7 +112,7 @@ def eval(args):
...
@@ -112,7 +112,7 @@ def eval(args):
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataset
,
eval_dataset
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
num_workers
=
8
,
num_workers
=
args
.
num_workers
,
shuffle
=
False
,
shuffle
=
False
,
collate_fn
=
DataCollator
())
collate_fn
=
DataCollator
())
...
...
ppstructure/vqa/eval_ser.py
浏览文件 @
2059a5a2
...
@@ -61,7 +61,7 @@ def eval(args):
...
@@ -61,7 +61,7 @@ def eval(args):
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataset
,
eval_dataset
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
num_workers
=
8
,
num_workers
=
args
.
num_workers
,
use_shared_memory
=
True
,
use_shared_memory
=
True
,
collate_fn
=
None
,
)
collate_fn
=
None
,
)
...
...
ppstructure/vqa/train_re.py
浏览文件 @
2059a5a2
...
@@ -97,14 +97,14 @@ def train(args):
...
@@ -97,14 +97,14 @@ def train(args):
train_dataloader
=
paddle
.
io
.
DataLoader
(
train_dataloader
=
paddle
.
io
.
DataLoader
(
train_dataset
,
train_dataset
,
batch_sampler
=
train_sampler
,
batch_sampler
=
train_sampler
,
num_workers
=
8
,
num_workers
=
args
.
num_workers
,
use_shared_memory
=
True
,
use_shared_memory
=
True
,
collate_fn
=
DataCollator
())
collate_fn
=
DataCollator
())
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataset
,
eval_dataset
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
num_workers
=
8
,
num_workers
=
args
.
num_workers
,
shuffle
=
False
,
shuffle
=
False
,
collate_fn
=
DataCollator
())
collate_fn
=
DataCollator
())
...
...
ppstructure/vqa/train_ser.py
浏览文件 @
2059a5a2
...
@@ -94,14 +94,14 @@ def train(args):
...
@@ -94,14 +94,14 @@ def train(args):
train_dataloader
=
paddle
.
io
.
DataLoader
(
train_dataloader
=
paddle
.
io
.
DataLoader
(
train_dataset
,
train_dataset
,
batch_sampler
=
train_sampler
,
batch_sampler
=
train_sampler
,
num_workers
=
8
,
num_workers
=
args
.
num_workers
,
use_shared_memory
=
True
,
use_shared_memory
=
True
,
collate_fn
=
None
,
)
collate_fn
=
None
,
)
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataloader
=
paddle
.
io
.
DataLoader
(
eval_dataset
,
eval_dataset
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
batch_size
=
args
.
per_gpu_eval_batch_size
,
num_workers
=
8
,
num_workers
=
args
.
num_workers
,
use_shared_memory
=
True
,
use_shared_memory
=
True
,
collate_fn
=
None
,
)
collate_fn
=
None
,
)
...
...
ppstructure/vqa/utils.py
浏览文件 @
2059a5a2
...
@@ -363,6 +363,7 @@ def parse_args():
...
@@ -363,6 +363,7 @@ def parse_args():
parser
.
add_argument
(
"--output_dir"
,
default
=
None
,
type
=
str
,
required
=
True
,)
parser
.
add_argument
(
"--output_dir"
,
default
=
None
,
type
=
str
,
required
=
True
,)
parser
.
add_argument
(
"--max_seq_length"
,
default
=
512
,
type
=
int
,)
parser
.
add_argument
(
"--max_seq_length"
,
default
=
512
,
type
=
int
,)
parser
.
add_argument
(
"--evaluate_during_training"
,
action
=
"store_true"
,)
parser
.
add_argument
(
"--evaluate_during_training"
,
action
=
"store_true"
,)
parser
.
add_argument
(
"--num_workers"
,
efault
=
8
,
type
=
int
,)
parser
.
add_argument
(
"--per_gpu_train_batch_size"
,
default
=
8
,
parser
.
add_argument
(
"--per_gpu_train_batch_size"
,
default
=
8
,
type
=
int
,
help
=
"Batch size per GPU/CPU for training."
,)
type
=
int
,
help
=
"Batch size per GPU/CPU for training."
,)
parser
.
add_argument
(
"--per_gpu_eval_batch_size"
,
default
=
8
,
parser
.
add_argument
(
"--per_gpu_eval_batch_size"
,
default
=
8
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录