diff --git a/.travis.yml b/.travis.yml index ca9f2762261e2d452f2c6a93e8e1ab793e7155bc..8d725fb17fdfbd7111a9491d7172c997834269b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,7 @@ addons: - python2.7-dev - golang before_install: - - pip install -U virtualenv pre-commit pip + - sudo pip install -U virtualenv pre-commit pip - GOPATH=/tmp/go go get -u github.com/wangkuiyi/ipynb/markdown-to-ipynb script: - PATH=/tmp/go/bin:$PATH .travis/precommit.sh diff --git a/01.fit_a_line/train.py b/01.fit_a_line/train.py index dba53181b453350efcfca80b31cb288e91076e93..3629523cc802558a01613b4bce6de76685c7ac52 100644 --- a/01.fit_a_line/train.py +++ b/01.fit_a_line/train.py @@ -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.mse_cost(input=y_predict, label=y) + cost = paddle.layer.square_error_cost(input=y_predict, label=y) # create parameters parameters = paddle.parameters.create(cost)