Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleSeg
提交
df6ccb19
P
PaddleSeg
项目概览
PaddlePaddle
/
PaddleSeg
通知
285
Star
8
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
53
列表
看板
标记
里程碑
合并请求
3
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleSeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
53
Issue
53
列表
看板
标记
里程碑
合并请求
3
合并请求
3
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
df6ccb19
编写于
9月 23, 2020
作者:
M
michaelowenliu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
change eval_dataset to val_dataset
上级
53f1d1e4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
dygraph/paddleseg/core/train.py
dygraph/paddleseg/core/train.py
+4
-4
dygraph/train.py
dygraph/train.py
+1
-1
未找到文件。
dygraph/paddleseg/core/train.py
浏览文件 @
df6ccb19
...
@@ -52,7 +52,7 @@ def loss_computation(logits, label, losses):
...
@@ -52,7 +52,7 @@ def loss_computation(logits, label, losses):
def
train
(
model
,
def
train
(
model
,
train_dataset
,
train_dataset
,
places
=
None
,
places
=
None
,
e
val_dataset
=
None
,
val_dataset
=
None
,
optimizer
=
None
,
optimizer
=
None
,
save_dir
=
'output'
,
save_dir
=
'output'
,
iters
=
10000
,
iters
=
10000
,
...
@@ -173,10 +173,10 @@ def train(model,
...
@@ -173,10 +173,10 @@ def train(model,
paddle
.
save
(
optimizer
.
state_dict
(),
paddle
.
save
(
optimizer
.
state_dict
(),
os
.
path
.
join
(
current_save_dir
,
'model'
))
os
.
path
.
join
(
current_save_dir
,
'model'
))
if
e
val_dataset
is
not
None
:
if
val_dataset
is
not
None
:
mean_iou
,
avg_acc
=
evaluate
(
mean_iou
,
avg_acc
=
evaluate
(
model
,
model
,
e
val_dataset
,
val_dataset
,
model_dir
=
current_save_dir
,
model_dir
=
current_save_dir
,
num_classes
=
num_classes
,
num_classes
=
num_classes
,
ignore_index
=
ignore_index
,
ignore_index
=
ignore_index
,
...
@@ -188,7 +188,7 @@ def train(model,
...
@@ -188,7 +188,7 @@ def train(model,
paddle
.
save
(
model
.
state_dict
(),
paddle
.
save
(
model
.
state_dict
(),
os
.
path
.
join
(
best_model_dir
,
'model'
))
os
.
path
.
join
(
best_model_dir
,
'model'
))
logger
.
info
(
logger
.
info
(
'Current evaluated best model in
e
val_dataset is iter_{}, miou={:4f}'
'Current evaluated best model in val_dataset is iter_{}, miou={:4f}'
.
format
(
best_model_iter
,
best_mean_iou
))
.
format
(
best_model_iter
,
best_mean_iou
))
if
use_vdl
:
if
use_vdl
:
...
...
dygraph/train.py
浏览文件 @
df6ccb19
...
@@ -121,7 +121,7 @@ def main(args):
...
@@ -121,7 +121,7 @@ def main(args):
cfg
.
model
,
cfg
.
model
,
train_dataset
,
train_dataset
,
places
=
places
,
places
=
places
,
e
val_dataset
=
val_dataset
,
val_dataset
=
val_dataset
,
optimizer
=
cfg
.
optimizer
,
optimizer
=
cfg
.
optimizer
,
save_dir
=
args
.
save_dir
,
save_dir
=
args
.
save_dir
,
iters
=
cfg
.
iters
,
iters
=
cfg
.
iters
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录