Aufgrund von Umarbeiten des s3 Storage wird es in GitLab, in nächster Zeit, mögliche Performance-Einbußen geben. Näheres dazu unter: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/43/show_ticket/6670

Commit 9981e319 authored by Christian Fuß's avatar Christian Fuß

added RNNencdecGenerationTest to test unrolls

parent c90ec64e
This diff is collapsed.
This diff is collapsed.
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_10_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_10_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_10_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_10_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_10_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_10_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_10_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_10_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_20_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_20_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_20_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_20_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_20_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_20_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_20_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_20_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_30_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_30_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_30_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_30_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_30_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_30_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_30_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_30_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_40_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_40_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_40_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_40_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
{
"nodes": [
{
"op": "null",
"name": "data",
"inputs": []
},
{
"op": "null",
"name": "net_40_dense0_weight",
"attrs": {
"__dtype__": "0",
"__lr_mult__": "1.0",
"__shape__": "(10, 0)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "null",
"name": "net_40_dense0_bias",
"attrs": {
"__dtype__": "0",
"__init__": "zeros",
"__lr_mult__": "1.0",
"__shape__": "(10,)",
"__storage_type__": "0",
"__wd_mult__": "1.0"
},
"inputs": []
},
{
"op": "FullyConnected",
"name": "net_40_dense0_fwd",
"attrs": {
"flatten": "True",
"no_bias": "False",
"num_hidden": "10"
},
"inputs": [[0, 0, 0], [1, 0, 0], [2, 0, 0]]
},
{
"op": "softmax",
"name": "net_40_softmax0_softmax0",
"inputs": [[3, 0, 0]]
}
],
"arg_nodes": [0, 1, 2],
"node_row_ptr": [0, 1, 2, 3, 4, 5],
"heads": [[4, 0, 0]],
"attrs": {"mxnet_version": ["int", 10400]}
}
\ No newline at end of file
......@@ -135,6 +135,23 @@ public abstract class IntegrationTest extends AbstractSymtabTest {
deleteInstanceTestCifarHashFile();
}
@Test
public void testDontRetrain4() {
Log.getFindings().clear();
String[] args = {"-m", "src/test/resources/models", "-r", "instanceTestUnroll.MainRNN", "-b", this.backend};
EMADLGeneratorCli.main(args);
//assertTrue(Log.getFindings().size() == 1);
//assertTrue(Log.getFindings().get(0).getMsg().contains("skipped"));
final Path instanceTestCifarHasFile
= Paths.get("./target/generated-sources-emadl/instanceTestUnroll/RNNencdec.training_hash");
try {
Files.delete(instanceTestCifarHasFile);
}
catch(Exception e) {
assertFalse("Could not delete hash file", true);
}
}
private void deleteInstanceTestCifarHashFile() {
final Path instanceTestCifarHasFile
= Paths.get("./target/generated-sources-emadl/instanceTestCifar/CifarNetwork.training_hash");
......
component RNNencdec{
ports in Q(0:1)^{30000} source,
out Q(0:1)^{30000} target[50];
out Q(0:1)^{30000} target[5];
implementation CNN{
source -> Softmax() -> target[0];
timed <t=2> BeamSearchStart(max_length=3){
target[t-1] ->
timed <t=0> BeamSearchStart(max_length=4){
target[t] ->
FullyConnected(units=30000) ->
Softmax() ->
target[t]
target[t+1]
};
......
......@@ -13,4 +13,4 @@ MultipleOutputs src/test/resources/training_data/MultipleOutputs
MultipleStreams src/test/resources/training_data/MultipleStreams
Invariant src/test/resources/training_data/Invariant
RNNtest data/RNNtest
RNNencdec data/RNNencdec
\ No newline at end of file
instanceTestUnroll.RNNencdec src/test/resources/training_data/Cifar/data_outArray
package instanceTestUnroll;
component ArgMax<Z(1:oo) n = 2>{
ports in Q^{n} inputVector,
out Z(0:oo) maxIndex;
implementation Math{
maxIndex = 0;
Q maxValue = inputVector(1);
for i = 2:n
if inputVector(i) > maxValue
maxIndex = i - 1;
maxValue = inputVector(i);
end
end
}
}
\ No newline at end of file
package instanceTestUnroll;
import Network;
import CalculateClass;
component Cifar10Classifier{
ports in Z(0:255)^{3, 32, 32} image,
out Z(0:9) classIndex;
instance RNNencdec<10> net;
instance ArgMax<10> calculateClass;
connect image -> net.data;
connect net.softmax -> calculateClass.inputVector;