Commit d5edf373 authored by Sebastian N.'s avatar Sebastian N.

Updated

parent e174bc00
Pipeline #180602 failed with stages
in 54 seconds
......@@ -29,8 +29,7 @@ import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instance
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstantiationSymbol;
import de.monticore.lang.math._symboltable.MathStatementsSymbol;
import de.monticore.lang.monticar.cnnarch._symboltable.ArchitectureSymbol;
import de.monticore.lang.monticar.cnnarch._symboltable.SerialCompositeElementSymbol;
import de.monticore.lang.monticar.cnnarch._symboltable.UnrollSymbol;
import de.monticore.lang.monticar.cnnarch._symboltable.NetworkInstructionSymbol;
import de.monticore.lang.monticar.cnnarch.generator.CNNArchGenerator;
import de.monticore.lang.monticar.cnnarch.generator.CNNTrainGenerator;
import de.monticore.lang.monticar.cnnarch.generator.DataPathConfigParser;
......@@ -482,24 +481,14 @@ public class EMADLGenerator {
String networkAttributes = "public:";
int i = 0;
for (SerialCompositeElementSymbol stream : architecture.getStreams()) {
if (stream.isTrainable()) {
for (NetworkInstructionSymbol networkInstruction : architecture.getNetworkInstructions()) {
if (networkInstruction.getBody().isTrainable()) {
networkAttributes += "\n" + predictorClassName + "_" + i + " _predictor_" + i + "_;";
}
++i;
}
for(UnrollSymbol unroll: architecture.getUnrolls()) {
for (SerialCompositeElementSymbol body : unroll.getBodiesForAllTimesteps()) {
if (body.isTrainable()) {
networkAttributes += "\n" + predictorClassName + "_" + i + " _predictor_" + i + "_;";
}
++i;
}
}
component = component.replaceFirst("public:", networkAttributes);
//insert execute method
......
......@@ -15,7 +15,6 @@ component RNNencdec<Z(2:oo) classes = 10, max_length=5>{
Softmax() ->
softmax[0];
timed <t> GreedySearch(max_length=5){
softmax[t-1] ->
FullyConnected(units=classes) ->
......
......@@ -136,7 +136,7 @@ class CNNSupervisedTrainer_mnist_mnistClassifier_net:
predictions_label = batch.label[0].as_in_context(mx_context)
with autograd.record():
predictions_ = mx.nd.zeros((10,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
predictions_ = self._networks[0](image_)
......@@ -174,7 +174,7 @@ class CNNSupervisedTrainer_mnist_mnistClassifier_net:
]
if True:
predictions_ = mx.nd.zeros((10,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
predictions_ = self._networks[0](image_)
......@@ -198,7 +198,7 @@ class CNNSupervisedTrainer_mnist_mnistClassifier_net:
]
if True:
predictions_ = mx.nd.zeros((10,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
predictions_ = self._networks[0](image_)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment