Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
magicwindyyd
mindspore
提交
fd045e91
M
mindspore
项目概览
magicwindyyd
/
mindspore
与 Fork 源项目一致
Fork自
MindSpore / mindspore
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
mindspore
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
fd045e91
编写于
6月 01, 2020
作者:
M
mindspore-ci-bot
提交者:
Gitee
6月 01, 2020
浏览文件
操作
浏览文件
下载
差异文件
!1742 modify-widedeep
Merge pull request !1742 from wukesong/modify_widedeep
上级
9eee5596
49437d13
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
6 deletion
+6
-6
model_zoo/wide_and_deep/src/callbacks.py
model_zoo/wide_and_deep/src/callbacks.py
+1
-1
model_zoo/wide_and_deep/src/config.py
model_zoo/wide_and_deep/src/config.py
+4
-4
model_zoo/wide_and_deep/test.py
model_zoo/wide_and_deep/test.py
+1
-1
未找到文件。
model_zoo/wide_and_deep/src/callbacks.py
浏览文件 @
fd045e91
...
@@ -53,7 +53,7 @@ class LossCallBack(Callback):
...
@@ -53,7 +53,7 @@ class LossCallBack(Callback):
print
(
"===loss==="
,
cb_params
.
cur_epoch_num
,
cur_step_in_epoch
,
wide_loss
,
deep_loss
)
print
(
"===loss==="
,
cb_params
.
cur_epoch_num
,
cur_step_in_epoch
,
wide_loss
,
deep_loss
)
# raise ValueError
# raise ValueError
if
self
.
_per_print_times
!=
0
and
cur_num
%
self
.
_per_print_times
==
0
and
config
is
not
None
:
if
self
.
_per_print_times
!=
0
and
cur_num
%
self
.
_per_print_times
==
0
and
self
.
config
is
not
None
:
loss_file
=
open
(
self
.
config
.
loss_file_name
,
"a+"
)
loss_file
=
open
(
self
.
config
.
loss_file_name
,
"a+"
)
loss_file
.
write
(
"epoch: %s, step: %s, wide_loss: %s, deep_loss: %s"
%
loss_file
.
write
(
"epoch: %s, step: %s, wide_loss: %s, deep_loss: %s"
%
(
cb_params
.
cur_epoch_num
,
cur_step_in_epoch
,
wide_loss
,
deep_loss
))
(
cb_params
.
cur_epoch_num
,
cur_step_in_epoch
,
wide_loss
,
deep_loss
))
...
...
model_zoo/wide_and_deep/src/config.py
浏览文件 @
fd045e91
...
@@ -22,8 +22,8 @@ def argparse_init():
...
@@ -22,8 +22,8 @@ def argparse_init():
parser
=
argparse
.
ArgumentParser
(
description
=
'WideDeep'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'WideDeep'
)
parser
.
add_argument
(
"--data_path"
,
type
=
str
,
default
=
"./test_raw_data/"
)
parser
.
add_argument
(
"--data_path"
,
type
=
str
,
default
=
"./test_raw_data/"
)
parser
.
add_argument
(
"--epochs"
,
type
=
int
,
default
=
15
)
parser
.
add_argument
(
"--epochs"
,
type
=
int
,
default
=
15
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
1
0
000
)
parser
.
add_argument
(
"--batch_size"
,
type
=
int
,
default
=
1
6
000
)
parser
.
add_argument
(
"--eval_batch_size"
,
type
=
int
,
default
=
1
5
)
parser
.
add_argument
(
"--eval_batch_size"
,
type
=
int
,
default
=
1
6000
)
parser
.
add_argument
(
"--field_size"
,
type
=
int
,
default
=
39
)
parser
.
add_argument
(
"--field_size"
,
type
=
int
,
default
=
39
)
parser
.
add_argument
(
"--vocab_size"
,
type
=
int
,
default
=
184965
)
parser
.
add_argument
(
"--vocab_size"
,
type
=
int
,
default
=
184965
)
parser
.
add_argument
(
"--emb_dim"
,
type
=
int
,
default
=
80
)
parser
.
add_argument
(
"--emb_dim"
,
type
=
int
,
default
=
80
)
...
@@ -45,8 +45,8 @@ class WideDeepConfig():
...
@@ -45,8 +45,8 @@ class WideDeepConfig():
def
__init__
(
self
):
def
__init__
(
self
):
self
.
data_path
=
"./test_raw_data/"
self
.
data_path
=
"./test_raw_data/"
self
.
epochs
=
15
self
.
epochs
=
15
self
.
batch_size
=
1
0
000
self
.
batch_size
=
1
6
000
self
.
eval_batch_size
=
1
0
000
self
.
eval_batch_size
=
1
6
000
self
.
field_size
=
39
self
.
field_size
=
39
self
.
vocab_size
=
184965
self
.
vocab_size
=
184965
self
.
emb_dim
=
80
self
.
emb_dim
=
80
...
...
model_zoo/wide_and_deep/test.py
浏览文件 @
fd045e91
...
@@ -91,4 +91,4 @@ if __name__ == "__main__":
...
@@ -91,4 +91,4 @@ if __name__ == "__main__":
widedeep_config
=
WideDeepConfig
()
widedeep_config
=
WideDeepConfig
()
widedeep_config
.
argparse_init
()
widedeep_config
.
argparse_init
()
test_eval
(
widedeep_config
.
widedeep
)
test_eval
(
widedeep_config
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录