Skip to content

Linear Regression example doesn't work. #175

Closed

Description

@Esther2013

Linear Regression example doesn't work.

create_op: NoOp 'GradientDescent', inputs: empty, control_inputs: GradientDescent/update_weight/ApplyGradientDescent, GradientDescent/update_bias/ApplyGradientDescent, outputs: empty
create_op: NoOp 'init', inputs: empty, control_inputs: weight/Assign, bias/Assign, outputs: empty
Epoch: 50 cost=NaN W=NaN b=NaN
Epoch: 100 cost=NaN W=NaN b=NaN

Activity

  1. Oceania2018 commented on Feb 21, 2019

    @Oceania2018
    Member

    Got some clue. There are only 95 nodes, ideally there should be 121 nodes. Have to figure out what is missing.

  2. added
    bug
    on Feb 21, 2019
  3. added this to the v0.11 Gradient milestone on Feb 21, 2019
  4. added a commit that references this issue on Feb 21, 2019
  5. Oceania2018 commented on Feb 21, 2019

    @Oceania2018
    Member

    Added all operations but still not running, try to export meta graph and import.

  6. Oceania2018 commented on Feb 22, 2019

    @Oceania2018
    Member

    It's working now. Check the code here:

    2/22/2019 5:46:00 AM Starting LinearRegression
    2019-02-21 23:46:01.084687: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
    Epoch: 50 cost=0.1932824 W=0.440269 b=-0.5702394
    Epoch: 100 cost=0.1798451 W=0.4289288 b=-0.4886577
    Epoch: 150 cost=0.1679595 W=0.4182628 b=-0.4119281
    Epoch: 200 cost=0.1574465 W=0.4082314 b=-0.3397623
    Epoch: 250 cost=0.1481478 W=0.3987965 b=-0.2718883
    Epoch: 300 cost=0.1399229 W=0.3899226 b=-0.208051
    Epoch: 350 cost=0.1326481 W=0.3815766 b=-0.1480103
    Epoch: 400 cost=0.1262135 W=0.373727 b=-0.09154031
    Epoch: 450 cost=0.1205223 W=0.3663442 b=-0.038429
    Epoch: 500 cost=0.1154885 W=0.3594005 b=0.01152356
    Epoch: 550 cost=0.1110362 W=0.3528697 b=0.05850525
    Epoch: 600 cost=0.1070983 W=0.3467275 b=0.1026927
    Epoch: 650 cost=0.1036154 W=0.3409505 b=0.1442519
    Epoch: 700 cost=0.100535 W=0.335517 b=0.1833397
    Epoch: 750 cost=0.09781052 W=0.3304067 b=0.2201028
    Epoch: 800 cost=0.09540092 W=0.3256003 b=0.2546793
    Epoch: 850 cost=0.09326982 W=0.3210799 b=0.2871991
    Epoch: 900 cost=0.09138502 W=0.3168282 b=0.3177855
    Epoch: 950 cost=0.08971816 W=0.3128294 b=0.3465521
    Epoch: 1000 cost=0.08824395 W=0.3090685 b=0.3736083
    Optimization Finished!
    Training cost=0.08824395 W=0.3090685 b=0.3736083
    Testing... (Mean square loss Comparison)
    Testing cost=0.07984468
    Absolute mean square loss difference: 0.008399263
    2/22/2019 5:46:04 AM Completed LinearRegression
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions