Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
rename mse into square_error after dev branch update.
Browse files Browse the repository at this point in the history
  • Loading branch information
lcy-seso committed Sep 4, 2017
1 parent ed27028 commit d069d32
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions 05.recommender_system/README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ inference = paddle.layer.cos_sim(a=usr_combined_features, b=mov_combined_feature


```python
cost = paddle.layer.mse_cost(
cost = paddle.layer.square_error_cost(
input=inference,
label=paddle.layer.data(
name='score', type=paddle.data_type.dense_vector(1)))
Expand All @@ -316,7 +316,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 [__mse_cost_0__]
[INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__square_error_cost_0__]


`parameters`是模型的所有参数集合。他是一个python的dict。我们可以查看到这个网络中的所有参数名称。因为之前定义模型的时候,我们没有指定参数名称,这里参数名称是自动生成的。当然,我们也可以指定每一个参数名称,方便日后维护。
Expand All @@ -340,7 +340,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 [__mse_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__square_error_cost_0__]


### 训练
Expand Down
4 changes: 2 additions & 2 deletions 05.recommender_system/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,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.mse_cost(
cost = paddle.layer.square_error_cost(
input=inference,
label=paddle.layer.data(
name='score', type=paddle.data_type.dense_vector(1)))
Expand Down Expand Up @@ -303,7 +303,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 [__mse_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__square_error_cost_0__]
```

### Training
Expand Down
6 changes: 3 additions & 3 deletions 05.recommender_system/index.cn.html
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@


```python
cost = paddle.layer.mse_cost(
cost = paddle.layer.square_error_cost(
input=inference,
label=paddle.layer.data(
name='score', type=paddle.data_type.dense_vector(1)))
Expand All @@ -358,7 +358,7 @@
```

[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 [__mse_cost_0__]
[INFO 2017-03-06 17:12:13,287 networks.py:1478] The output order is [__square_error_cost_0__]


`parameters`是模型的所有参数集合。他是一个python的dict。我们可以查看到这个网络中的所有参数名称。因为之前定义模型的时候,我们没有指定参数名称,这里参数名称是自动生成的。当然,我们也可以指定每一个参数名称,方便日后维护。
Expand All @@ -382,7 +382,7 @@
```

[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 [__mse_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__square_error_cost_0__]


### 训练
Expand Down
4 changes: 2 additions & 2 deletions 05.recommender_system/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@

```python
inference = paddle.layer.cos_sim(a=usr_combined_features, b=mov_combined_features, size=1, scale=5)
cost = paddle.layer.mse_cost(
cost = paddle.layer.square_error_cost(
input=inference,
label=paddle.layer.data(
name='score', type=paddle.data_type.dense_vector(1)))
Expand Down Expand Up @@ -345,7 +345,7 @@

```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 [__mse_cost_0__]
[INFO 2017-03-06 17:12:13,379 networks.py:1478] The output order is [__square_error_cost_0__]
```

### Training
Expand Down
2 changes: 1 addition & 1 deletion 05.recommender_system/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def main():
mov_combined_features = get_mov_combined_features()
inference = paddle.layer.cos_sim(
a=usr_combined_features, b=mov_combined_features, size=1, scale=5)
cost = paddle.layer.mse_cost(
cost = paddle.layer.square_error_cost(
input=inference,
label=paddle.layer.data(
name='score', type=paddle.data_type.dense_vector(1)))
Expand Down

0 comments on commit d069d32

Please sign in to comment.