Skip to content

Commit 69f5101

Browse files
committed
Add default name for AdamOptimizer.
1 parent da48a2a commit 69f5101

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/TensorFlowNET.Core/Train/tf.optimizers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public static class train
1313
public static Optimizer GradientDescentOptimizer(float learning_rate)
1414
=> new GradientDescentOptimizer(learning_rate);
1515

16-
public static Optimizer AdamOptimizer(float learning_rate, string name = null)
16+
public static Optimizer AdamOptimizer(float learning_rate, string name = "Adam")
1717
=> new AdamOptimizer(learning_rate, name: name);
1818

1919
public static Saver Saver(VariableV1[] var_list = null) => new Saver(var_list: var_list);

test/TensorFlowNET.Examples/TextProcess/CnnTextClassification.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public class CnnTextClassification : IExample
2222
public bool Enabled { get; set; } = true;
2323
public string Name => "CNN Text Classification";
2424
public int? DataLimit = null;
25-
public bool IsImportingGraph { get; set; } = true;
25+
public bool IsImportingGraph { get; set; } = false;
2626

2727
private const string dataDir = "word_cnn";
2828
private string dataFileName = "dbpedia_csv.tar.gz";
@@ -304,7 +304,6 @@ private bool Train(Session sess, Graph graph)
304304
public bool Train()
305305
{
306306
var graph = IsImportingGraph ? ImportGraph() : BuildGraph();
307-
// string json = JsonConvert.SerializeObject(graph, Formatting.Indented);
308307
return with(tf.Session(graph), sess => Train(sess, graph));
309308
}
310309

0 commit comments

Comments
 (0)