Skip to content

Commit b1feb13

Browse files
committed
Fix NeuralNetwork.printAll() since the change from Groovy to Java
1 parent 46bee0b commit b1feb13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/groovy/net/zomis/machlearn/neural/NeuralNetwork.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public Stream<NeuronLink> links() {
4343
}
4444

4545
public void printAll() {
46-
System.out.println("$layerCount layers:");
46+
System.out.println(getLayerCount() + " layers:");
4747
layers.stream().forEach(it -> {
4848
it.printNodes();
4949
System.out.println();

src/main/groovy/net/zomis/machlearn/neural/Neuron.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public void addInputs(NeuronLayer layer) {
6969
}
7070

7171
public void printInfo() {
72-
System.out.println("Node $this\n inputs $inputs\n outputs $outputs\n input $input output $output");
72+
System.out.printf("Node %s\n inputs %s\n outputs %s\n input %f output %f%n",
73+
this, inputs, outputs, input, output);
7374
}
7475

7576
@Override

0 commit comments

Comments
 (0)