diff --git a/test/TensorFlowNET.Examples/LogisticRegression.cs b/test/TensorFlowNET.Examples/LogisticRegression.cs index 248cce31..65025008 100644 --- a/test/TensorFlowNET.Examples/LogisticRegression.cs +++ b/test/TensorFlowNET.Examples/LogisticRegression.cs @@ -53,7 +53,6 @@ namespace TensorFlowNET.Examples return with(tf.Session(), sess => { - // Run the initializer sess.run(init); @@ -71,7 +70,7 @@ namespace TensorFlowNET.Examples new FeedItem(x, batch_xs), new FeedItem(y, batch_ys)); - var c = (float)result[1]; + float c = result[1]; // Compute average loss avg_cost += c / total_batch; } diff --git a/test/TensorFlowNET.Examples/Utility/MnistDataSet.cs b/test/TensorFlowNET.Examples/Utility/MnistDataSet.cs index 2ae1956a..e0e7c0ee 100644 --- a/test/TensorFlowNET.Examples/Utility/MnistDataSet.cs +++ b/test/TensorFlowNET.Examples/Utility/MnistDataSet.cs @@ -96,7 +96,7 @@ namespace TensorFlowNET.Examples.Utility for(int row = 0; row < num_labels; row++) { var col = labels_dense.Data(row); - labels_one_hot[row, col] = 1; + labels_one_hot.SetData(1, row, col); } return labels_one_hot;