|
@@ -15,10 +15,6 @@ namespace TensorFlowNET.UnitTest.Training |
|
|
[TestMethod] |
|
|
[TestMethod] |
|
|
public void LinearRegression() |
|
|
public void LinearRegression() |
|
|
{ |
|
|
{ |
|
|
var graph = tf.Graph().as_default(); |
|
|
|
|
|
var sess = new Session(graph); |
|
|
|
|
|
sess.as_default(); |
|
|
|
|
|
|
|
|
|
|
|
// Initialize the weights to `5.0` and the bias to `0.0` |
|
|
// Initialize the weights to `5.0` and the bias to `0.0` |
|
|
// In practice, these should be initialized to random values (for example, with `tf.random.normal`) |
|
|
// In practice, these should be initialized to random values (for example, with `tf.random.normal`) |
|
|
var W = tf.Variable(5.0f); |
|
|
var W = tf.Variable(5.0f); |
|
|