Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
models
提交
adfd9c8d
M
models
项目概览
PaddlePaddle
/
models
大约 1 年 前同步成功
通知
222
Star
6828
Fork
2962
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
602
列表
看板
标记
里程碑
合并请求
255
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
models
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
602
Issue
602
列表
看板
标记
里程碑
合并请求
255
合并请求
255
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
adfd9c8d
编写于
3月 06, 2019
作者:
Z
zhengya01
提交者:
GitHub
3月 06, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20 from PaddlePaddle/develop
update
上级
ecfc61a3
156b8996
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
16 addition
and
6 deletion
+16
-6
fluid/PaddleCV/deeplabv3+/.run_ce.sh
fluid/PaddleCV/deeplabv3+/.run_ce.sh
+1
-1
fluid/PaddleCV/gan/cycle_gan/trainer.py
fluid/PaddleCV/gan/cycle_gan/trainer.py
+4
-0
fluid/PaddleNLP/machine_reading_comprehension/run.py
fluid/PaddleNLP/machine_reading_comprehension/run.py
+6
-2
fluid/PaddleRec/tagspace/README.md
fluid/PaddleRec/tagspace/README.md
+5
-3
未找到文件。
fluid/PaddleCV/deeplabv3+/.run_ce.sh
浏览文件 @
adfd9c8d
...
...
@@ -20,7 +20,7 @@ cudaid=${deeplabv3plus_m:=0,1,2,3} # use 0,1,2,3 card as default
export
CUDA_VISIBLE_DEVICES
=
$cudaid
FLAGS_benchmark
=
true
python train.py
\
--batch_size
=
2
\
--batch_size
=
8
\
--train_crop_size
=
769
\
--total_step
=
50
\
--save_weights_path
=
output4
\
...
...
fluid/PaddleCV/gan/cycle_gan/trainer.py
浏览文件 @
adfd9c8d
...
...
@@ -13,6 +13,8 @@ class GATrainer():
self
.
program
=
fluid
.
default_main_program
().
clone
()
with
fluid
.
program_guard
(
self
.
program
):
self
.
fake_B
=
build_generator_resnet_9blocks
(
input_A
,
name
=
"g_A"
)
#FIXME set persistable explicitly to pass CE
self
.
fake_B
.
persistable
=
True
self
.
fake_A
=
build_generator_resnet_9blocks
(
input_B
,
name
=
"g_B"
)
self
.
cyc_A
=
build_generator_resnet_9blocks
(
self
.
fake_B
,
"g_B"
)
self
.
cyc_B
=
build_generator_resnet_9blocks
(
self
.
fake_A
,
"g_A"
)
...
...
@@ -58,6 +60,8 @@ class GBTrainer():
with
fluid
.
program_guard
(
self
.
program
):
self
.
fake_B
=
build_generator_resnet_9blocks
(
input_A
,
name
=
"g_A"
)
self
.
fake_A
=
build_generator_resnet_9blocks
(
input_B
,
name
=
"g_B"
)
#FIXME set persistable explicitly to pass CE
self
.
fake_A
.
persistable
=
True
self
.
cyc_A
=
build_generator_resnet_9blocks
(
self
.
fake_B
,
"g_B"
)
self
.
cyc_B
=
build_generator_resnet_9blocks
(
self
.
fake_A
,
"g_A"
)
self
.
infer_program
=
self
.
program
.
clone
()
...
...
fluid/PaddleNLP/machine_reading_comprehension/run.py
浏览文件 @
adfd9c8d
...
...
@@ -207,10 +207,14 @@ def validation(inference_program, avg_cost, s_probs, e_probs, match, feed_order,
"""
"""
build_strategy
=
fluid
.
BuildStrategy
()
build_strategy
.
enable_inplace
=
False
build_strategy
.
memory_optimize
=
False
parallel_executor
=
fluid
.
ParallelExecutor
(
main_program
=
inference_program
,
use_cuda
=
bool
(
args
.
use_gpu
),
loss_name
=
avg_cost
.
name
)
loss_name
=
avg_cost
.
name
,
build_strategy
=
build_strategy
)
print_para
(
inference_program
,
parallel_executor
,
logger
,
args
)
# Use test set as validation each pass
...
...
@@ -523,7 +527,7 @@ def evaluate(logger, args):
inference_program
=
main_program
.
clone
(
for_test
=
True
)
eval_loss
,
bleu_rouge
=
validation
(
inference_program
,
avg_cost
,
s_probs
,
e_probs
,
match
,
inference_program
,
avg_cost
,
s_probs
,
e_probs
,
match
,
feed_order
,
place
,
dev_count
,
vocab
,
brc_data
,
logger
,
args
)
logger
.
info
(
'Dev eval loss {}'
.
format
(
eval_loss
))
logger
.
info
(
'Dev eval result: {}'
.
format
(
bleu_rouge
))
...
...
fluid/PaddleRec/tagspace/README.md
浏览文件 @
adfd9c8d
...
...
@@ -29,7 +29,9 @@ Tagspace模型学习文本及标签的embedding表示,应用于工业级的标
## 数据下载及预处理
[
ag news dataset
](
https://github.com/mhjabreel/CharCNN/tree/master/data/ag_news_csv
)
数据地址:
[
ag news dataset
](
https://github.com/mhjabreel/CharCNN/tree/master/data/
)
备份数据地址:
[
ag news dataset
](
https://paddle-tagspace.bj.bcebos.com/data.tar
)
数据格式如下
...
...
@@ -37,7 +39,7 @@ Tagspace模型学习文本及标签的embedding表示,应用于工业级的标
"3","Wall St. Bears Claw Back Into the Black (Reuters)","Reuters - Short-sellers, Wall Street's dwindling\band of ultra-cynics, are seeing green again."
```
将文本数据转为paddle数据,先将数据放到训练数据目录和测试数据目录
备份数据解压后,
将文本数据转为paddle数据,先将数据放到训练数据目录和测试数据目录
```
mv train.csv raw_big_train_data
mv test.csv raw_big_test_data
...
...
@@ -59,7 +61,7 @@ CUDA_VISIBLE_DEVICES=0 python train.py --use_cuda 1
```
CPU 环境
```
python train.py
python train.py
```
全量数据单机单卡训练
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录