Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
book
提交
df2ba16e
B
book
项目概览
PaddlePaddle
/
book
通知
16
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
40
列表
看板
标记
里程碑
合并请求
37
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
B
book
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
40
Issue
40
列表
看板
标记
里程碑
合并请求
37
合并请求
37
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
df2ba16e
编写于
3月 20, 2017
作者:
T
Tao Luo
提交者:
GitHub
3月 20, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #219 from luotao1/mse
rename regression_cost to mse_cost
上级
9edce2a1
d0355ba0
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
23 addition
and
23 deletion
+23
-23
fit_a_line/README.en.ipynb
fit_a_line/README.en.ipynb
+1
-1
fit_a_line/README.en.md
fit_a_line/README.en.md
+1
-1
fit_a_line/README.ipynb
fit_a_line/README.ipynb
+1
-1
fit_a_line/README.md
fit_a_line/README.md
+1
-1
fit_a_line/index.en.html
fit_a_line/index.en.html
+1
-1
fit_a_line/index.html
fit_a_line/index.html
+1
-1
fit_a_line/train.py
fit_a_line/train.py
+1
-1
recommender_system/README.en.ipynb
recommender_system/README.en.ipynb
+2
-2
recommender_system/README.en.md
recommender_system/README.en.md
+2
-2
recommender_system/README.ipynb
recommender_system/README.ipynb
+3
-3
recommender_system/README.md
recommender_system/README.md
+3
-3
recommender_system/index.en.html
recommender_system/index.en.html
+2
-2
recommender_system/index.html
recommender_system/index.html
+3
-3
recommender_system/train.py
recommender_system/train.py
+1
-1
未找到文件。
fit_a_line/README.en.ipynb
浏览文件 @
df2ba16e
...
...
@@ -189,7 +189,7 @@
" size=1,\n",
" act=paddle.activation.Linear())\n",
"y = paddle.layer.data(name='y', type=paddle.data_type.dense_vector(1))\n",
"cost = paddle.layer.
regression
_cost(input=y_predict, label=y)\n"
"cost = paddle.layer.
mse
_cost(input=y_predict, label=y)\n"
],
"outputs": [
{
...
...
fit_a_line/README.en.md
浏览文件 @
df2ba16e
...
...
@@ -132,7 +132,7 @@ y_predict = paddle.layer.fc(input=x,
size
=
1
,
act
=
paddle
.
activation
.
Linear
())
y
=
paddle
.
layer
.
data
(
name
=
'y'
,
type
=
paddle
.
data_type
.
dense_vector
(
1
))
cost
=
paddle
.
layer
.
regression
_cost
(
input
=
y_predict
,
label
=
y
)
cost
=
paddle
.
layer
.
mse
_cost
(
input
=
y_predict
,
label
=
y
)
```
### Create Parameters
...
...
fit_a_line/README.ipynb
浏览文件 @
df2ba16e
...
...
@@ -183,7 +183,7 @@
" size=1,\n",
" act=paddle.activation.Linear())\n",
"y = paddle.layer.data(name='y', type=paddle.data_type.dense_vector(1))\n",
"cost = paddle.layer.
regression
_cost(input=y_predict, label=y)\n"
"cost = paddle.layer.
mse
_cost(input=y_predict, label=y)\n"
],
"outputs": [
{
...
...
fit_a_line/README.md
浏览文件 @
df2ba16e
...
...
@@ -126,7 +126,7 @@ y_predict = paddle.layer.fc(input=x,
size
=
1
,
act
=
paddle
.
activation
.
Linear
())
y
=
paddle
.
layer
.
data
(
name
=
'y'
,
type
=
paddle
.
data_type
.
dense_vector
(
1
))
cost
=
paddle
.
layer
.
regression
_cost
(
input
=
y_predict
,
label
=
y
)
cost
=
paddle
.
layer
.
mse
_cost
(
input
=
y_predict
,
label
=
y
)
```
### 创建参数
...
...
fit_a_line/index.en.html
浏览文件 @
df2ba16e
...
...
@@ -174,7 +174,7 @@ y_predict = paddle.layer.fc(input=x,
size=1,
act=paddle.activation.Linear())
y = paddle.layer.data(name='y', type=paddle.data_type.dense_vector(1))
cost = paddle.layer.
regression
_cost(input=y_predict, label=y)
cost = paddle.layer.
mse
_cost(input=y_predict, label=y)
```
### Create Parameters
...
...
fit_a_line/index.html
浏览文件 @
df2ba16e
...
...
@@ -168,7 +168,7 @@ y_predict = paddle.layer.fc(input=x,
size=1,
act=paddle.activation.Linear())
y = paddle.layer.data(name='y', type=paddle.data_type.dense_vector(1))
cost = paddle.layer.
regression
_cost(input=y_predict, label=y)
cost = paddle.layer.
mse
_cost(input=y_predict, label=y)
```
### 创建参数
...
...
fit_a_line/train.py
浏览文件 @
df2ba16e
...
...
@@ -10,7 +10,7 @@ def main():
x
=
paddle
.
layer
.
data
(
name
=
'x'
,
type
=
paddle
.
data_type
.
dense_vector
(
13
))
y_predict
=
paddle
.
layer
.
fc
(
input
=
x
,
size
=
1
,
act
=
paddle
.
activation
.
Linear
())
y
=
paddle
.
layer
.
data
(
name
=
'y'
,
type
=
paddle
.
data_type
.
dense_vector
(
1
))
cost
=
paddle
.
layer
.
regression
_cost
(
input
=
y_predict
,
label
=
y
)
cost
=
paddle
.
layer
.
mse
_cost
(
input
=
y_predict
,
label
=
y
)
# create parameters
parameters
=
paddle
.
parameters
.
create
(
cost
)
...
...
recommender_system/README.en.ipynb
浏览文件 @
df2ba16e
...
...
@@ -449,7 +449,7 @@
},
"source": [
"inference = paddle.layer.cos_sim(a=usr_combined_features, b=mov_combined_features, size=1, scale=5)\n",
"cost = paddle.layer.
regression
_cost(\n",
"cost = paddle.layer.
mse
_cost(\n",
" input=inference,\n",
" label=paddle.layer.data(\n",
" name='score', type=paddle.data_type.dense_vector(1)))\n"
...
...
@@ -536,7 +536,7 @@
"\n",
"```text\n",
"[INFO 2017-03-06 17:12:13,378 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]\n",
"[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
regression
_cost_0__]\n",
"[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
mse
_cost_0__]\n",
"```\n",
"\n",
"### Training\n",
...
...
recommender_system/README.en.md
浏览文件 @
df2ba16e
...
...
@@ -254,7 +254,7 @@ Finally, we can use cosine similarity to calculate the similarity between user c
```
python
inference
=
paddle
.
layer
.
cos_sim
(
a
=
usr_combined_features
,
b
=
mov_combined_features
,
size
=
1
,
scale
=
5
)
cost
=
paddle
.
layer
.
regression
_cost
(
cost
=
paddle
.
layer
.
mse
_cost
(
input
=
inference
,
label
=
paddle
.
layer
.
data
(
name
=
'score'
,
type
=
paddle
.
data_type
.
dense_vector
(
1
)))
...
...
@@ -282,7 +282,7 @@ trainer = paddle.trainer.SGD(cost=cost, parameters=parameters,
```
text
[INFO 2017-03-06 17:12:13,378 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
regression
_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
mse
_cost_0__]
```
### Training
...
...
recommender_system/README.ipynb
浏览文件 @
df2ba16e
...
...
@@ -479,7 +479,7 @@
"editable": true
},
"source": [
"cost = paddle.layer.
regression
_cost(\n",
"cost = paddle.layer.
mse
_cost(\n",
" input=inference,\n",
" label=paddle.layer.data(\n",
" name='score', type=paddle.data_type.dense_vector(1)))\n"
...
...
@@ -535,7 +535,7 @@
"source": [
"\n",
" [INFO 2017-03-06 17:12:13,284 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]\n",
" [INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__
regression
_cost_0__]\n",
" [INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__
mse
_cost_0__]\n",
"\n",
"\n",
"`parameters`是模型的所有参数集合。他是一个python的dict。我们可以查看到这个网络中的所有参数名称。因为之前定义模型的时候,我们没有指定参数名称,这里参数名称是自动生成的。当然,我们也可以指定每一个参数名称,方便日后维护。\n",
...
...
@@ -603,7 +603,7 @@
"source": [
"\n",
" [INFO 2017-03-06 17:12:13,378 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]\n",
" [INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
regression
_cost_0__]\n",
" [INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
mse
_cost_0__]\n",
"\n",
"\n",
"### 训练\n",
...
...
recommender_system/README.md
浏览文件 @
df2ba16e
...
...
@@ -268,7 +268,7 @@ inference = paddle.layer.cos_sim(a=usr_combined_features, b=mov_combined_feature
```
python
cost
=
paddle
.
layer
.
regression
_cost
(
cost
=
paddle
.
layer
.
mse
_cost
(
input
=
inference
,
label
=
paddle
.
layer
.
data
(
name
=
'score'
,
type
=
paddle
.
data_type
.
dense_vector
(
1
)))
...
...
@@ -287,7 +287,7 @@ parameters = paddle.parameters.create(cost)
```
[INFO 2017-03-06 17:12:13,284 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]
[INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__
regression
_cost_0__]
[INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__
mse
_cost_0__]
`parameters`
是模型的所有参数集合。他是一个python的dict。我们可以查看到这个网络中的所有参数名称。因为之前定义模型的时候,我们没有指定参数名称,这里参数名称是自动生成的。当然,我们也可以指定每一个参数名称,方便日后维护。
...
...
@@ -311,7 +311,7 @@ trainer = paddle.trainer.SGD(cost=cost, parameters=parameters,
```
[INFO 2017-03-06 17:12:13,378 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
regression
_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
mse
_cost_0__]
### 训练
...
...
recommender_system/index.en.html
浏览文件 @
df2ba16e
...
...
@@ -296,7 +296,7 @@ Finally, we can use cosine similarity to calculate the similarity between user c
```python
inference = paddle.layer.cos_sim(a=usr_combined_features, b=mov_combined_features, size=1, scale=5)
cost = paddle.layer.
regression
_cost(
cost = paddle.layer.
mse
_cost(
input=inference,
label=paddle.layer.data(
name='score', type=paddle.data_type.dense_vector(1)))
...
...
@@ -324,7 +324,7 @@ trainer = paddle.trainer.SGD(cost=cost, parameters=parameters,
```text
[INFO 2017-03-06 17:12:13,378 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
regression
_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
mse
_cost_0__]
```
### Training
...
...
recommender_system/index.html
浏览文件 @
df2ba16e
...
...
@@ -310,7 +310,7 @@ inference = paddle.layer.cos_sim(a=usr_combined_features, b=mov_combined_feature
```python
cost = paddle.layer.
regression
_cost(
cost = paddle.layer.
mse
_cost(
input=inference,
label=paddle.layer.data(
name='score', type=paddle.data_type.dense_vector(1)))
...
...
@@ -329,7 +329,7 @@ parameters = paddle.parameters.create(cost)
```
[INFO 2017-03-06 17:12:13,284 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]
[INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__
regression
_cost_0__]
[INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__
mse
_cost_0__]
`parameters`是模型的所有参数集合。他是一个python的dict。我们可以查看到这个网络中的所有参数名称。因为之前定义模型的时候,我们没有指定参数名称,这里参数名称是自动生成的。当然,我们也可以指定每一个参数名称,方便日后维护。
...
...
@@ -353,7 +353,7 @@ trainer = paddle.trainer.SGD(cost=cost, parameters=parameters,
```
[INFO 2017-03-06 17:12:13,378 networks.py:1472] The input order is [user_id, gender_id, age_id, job_id, movie_id, category_id, movie_title, score]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
regression
_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__
mse
_cost_0__]
### 训练
...
...
recommender_system/train.py
浏览文件 @
df2ba16e
...
...
@@ -61,7 +61,7 @@ def main():
inference
=
paddle
.
layer
.
cos_sim
(
a
=
usr_combined_features
,
b
=
mov_combined_features
,
size
=
1
,
scale
=
5
)
cost
=
paddle
.
layer
.
regression
_cost
(
cost
=
paddle
.
layer
.
mse
_cost
(
input
=
inference
,
label
=
paddle
.
layer
.
data
(
name
=
'score'
,
type
=
paddle
.
data_type
.
dense_vector
(
1
)))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录