diff --git a/docs/thesis.pdf b/docs/thesis.pdf index 52da0a43df7c9e0a3a80847558a9c1e10d5a7118..62d6637269d440f240d2e3da5f024135cf106624 100644 Binary files a/docs/thesis.pdf and b/docs/thesis.pdf differ diff --git a/pom.xml b/pom.xml index 81a86476615f546eca7902aec002aaef0d1d1441..70f1b70b1ce1fdeba8c79dad20a394ff51904af8 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 1.7.7 0.0.6 0.0.10-SNAPSHOT - 0.0.10-SNAPSHOT + 0.0.11-SNAPSHOT 0.0.11-SNAPSHOT diff --git a/src/test/resources/invalid_tests/DuplicatedArgument.cnna b/src/test/resources/invalid_tests/DuplicatedArgument.cnna index 4c476285bc6b52907903b745d7e0c0ce496b345e..6f885ac2d870ea5defa47394e835e82b921629c6 100644 --- a/src/test/resources/invalid_tests/DuplicatedArgument.cnna +++ b/src/test/resources/invalid_tests/DuplicatedArgument.cnna @@ -1,11 +1,11 @@ architecture DuplicatedArgument(){ - def input Q(-oo:+oo)^{10} in - def output Q(0:1)^{2} out + def input Q(-oo:+oo)^{10} in1 + def output Q(0:1)^{2} out1 - in -> + in1 -> FullyConnected(units=64, units=32) -> Tanh() -> FullyConnected(units=2) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/DuplicatedIONames.cnna b/src/test/resources/invalid_tests/DuplicatedIONames.cnna index 15e49205341b9d39e2d9323e3abb5ffe7348f3df..2940f406a499d2b76377266624025a6e353625b0 100644 --- a/src/test/resources/invalid_tests/DuplicatedIONames.cnna +++ b/src/test/resources/invalid_tests/DuplicatedIONames.cnna @@ -1,16 +1,16 @@ architecture DuplicatedIONames(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 def fc(){ FullyConnected(units=64) -> Tanh() } - in -> + in1 -> fc() -> FullyConnected(units=classes) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/DuplicatedNames.cnna b/src/test/resources/invalid_tests/DuplicatedNames.cnna index cf061ecc10121b0b9e1a6b256b4e911e699121db..1fbf822b9ed6149945d3f05d77684aebdb660d56 100644 --- a/src/test/resources/invalid_tests/DuplicatedNames.cnna +++ b/src/test/resources/invalid_tests/DuplicatedNames.cnna @@ -1,6 +1,6 @@ architecture DuplicatedNames(inputs=10, inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 def fc(){ FullyConnected(units=64) -> @@ -12,9 +12,9 @@ architecture DuplicatedNames(inputs=10, inputs=10, classes=2){ Tanh() } - in -> + in1 -> fc() -> FullyConnected(units=classes) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/IllegalName.cnna b/src/test/resources/invalid_tests/IllegalName.cnna index 4073a23df30cfa9d311a4d92f6d979f2dcbad5dd..ed8072165b2f326eb2a99a7206cd2b1676b42f33 100644 --- a/src/test/resources/invalid_tests/IllegalName.cnna +++ b/src/test/resources/invalid_tests/IllegalName.cnna @@ -1,15 +1,15 @@ architecture IllegalName(inputs=10, classes=2, Tg = 1){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 def Fc(){ FullyConnected(units=10) } - in -> + in1 -> FullyConnected(units=64) -> Tanh() -> FullyConnected(units=classes) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/InvalidIOShape1.cnna b/src/test/resources/invalid_tests/InvalidIOShape1.cnna index 8ddeab318f86df30ca47997bed68f27e74b7748f..3f03ce0919dc87e763133d7a4dfb783066379ec7 100644 --- a/src/test/resources/invalid_tests/InvalidIOShape1.cnna +++ b/src/test/resources/invalid_tests/InvalidIOShape1.cnna @@ -1,11 +1,11 @@ architecture InvalidIOShape1(){ - def input Q(-oo:+oo)^{10, 2} in - def output Q(0:1)^{10, 2, 2, 2} out + def input Q(-oo:+oo)^{10, 2} in1 + def output Q(0:1)^{10, 2, 2, 2} out1 - in -> + in1 -> FullyConnected(units=64) -> Tanh() -> FullyConnected(units=10) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/InvalidIOShape2.cnna b/src/test/resources/invalid_tests/InvalidIOShape2.cnna index 1890b44289b1025a849a966108c99876e2291246..3e746f60ca5a9ff54d6902c35bdadb342e9cac1e 100644 --- a/src/test/resources/invalid_tests/InvalidIOShape2.cnna +++ b/src/test/resources/invalid_tests/InvalidIOShape2.cnna @@ -1,11 +1,11 @@ architecture InvalidIOShape2(){ - def input Q(-oo:+oo)^{10.5} in - def output Q(0:1)^{-10} out + def input Q(-oo:+oo)^{10.5} in1 + def output Q(0:1)^{-10} out1 - in -> + in1 -> FullyConnected(units=64) -> Tanh() -> FullyConnected(units=10) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/InvalidInputShape.cnna b/src/test/resources/invalid_tests/InvalidInputShape.cnna index 816705e38476102d3f9dd641e9c110555bab5610..9fd7acb112637bbc70da161c430e173f082dcc35 100644 --- a/src/test/resources/invalid_tests/InvalidInputShape.cnna +++ b/src/test/resources/invalid_tests/InvalidInputShape.cnna @@ -1,11 +1,11 @@ architecture InvalidInputShape(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in[2] - def output Q(0:1)^{classes} out[2] + def input Q(-oo:+oo)^{inputs} in1[2] + def output Q(0:1)^{classes} out1[2] - in -> + in1 -> FullyConnected(units=64) -> Tanh() -> FullyConnected(units=classes) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/MissingIO2.cnna b/src/test/resources/invalid_tests/MissingIO2.cnna index 1f1f8d63ed55536c309d6b6e82c12e76ab16c58b..c82202cf1adba46fa4696dfb5517ce0d3d074aaa 100644 --- a/src/test/resources/invalid_tests/MissingIO2.cnna +++ b/src/test/resources/invalid_tests/MissingIO2.cnna @@ -1,11 +1,11 @@ architecture MissingIO2(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in[2] - def output Q(0:1)^{classes} out[2] + def input Q(-oo:+oo)^{inputs} in1[2] + def output Q(0:1)^{classes} out1[2] - in[0] -> + in1[0] -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Softmax() -> - out[0] + out1[0] } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/MissingLayerOperator.cnna b/src/test/resources/invalid_tests/MissingLayerOperator.cnna index 1ee80560e7c98cd18afbe403fe06cf0c8de1ce0e..6cea4a6e78a65f88b63dc536157d7ff48da829c0 100644 --- a/src/test/resources/invalid_tests/MissingLayerOperator.cnna +++ b/src/test/resources/invalid_tests/MissingLayerOperator.cnna @@ -1,11 +1,11 @@ architecture MissingLayerOperator(){ - def input Q(-oo:+oo)^{10} in - def output Q(0:1)^{2} out + def input Q(-oo:+oo)^{10} in1 + def output Q(0:1)^{2} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() FullyConnected(units=2, no_bias=true) Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/MissingMerge.cnna b/src/test/resources/invalid_tests/MissingMerge.cnna index c97f089732a63c83b7a230e728de13b72a1faff6..d2fb2e20e7da6374b1a68ffb88e65855357adcd6 100644 --- a/src/test/resources/invalid_tests/MissingMerge.cnna +++ b/src/test/resources/invalid_tests/MissingMerge.cnna @@ -1,8 +1,8 @@ architecture MissingMerge(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> ( ( FullyConnected(units=16) @@ -20,5 +20,5 @@ architecture MissingMerge(inputs=10, classes=2){ Tanh() -> FullyConnected(units=classes) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/NotIOArray.cnna b/src/test/resources/invalid_tests/NotIOArray.cnna index c6ecec7812c9d479500b1629cf439d0029cf85e7..a1f16d82d7eb05da499fb48fb447a8c7b0b6e039 100644 --- a/src/test/resources/invalid_tests/NotIOArray.cnna +++ b/src/test/resources/invalid_tests/NotIOArray.cnna @@ -1,11 +1,11 @@ architecture NotIOArray(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in[1] -> + in1[1] -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Softmax() -> - out[0] + out1[0] } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/UnfinishedArchitecture.cnna b/src/test/resources/invalid_tests/UnfinishedArchitecture.cnna index 62de07a8f32affe1cca82a7987bf8e3f47f7d620..2f806bbdebad82b494fcffd4f40e56356f7643b9 100644 --- a/src/test/resources/invalid_tests/UnfinishedArchitecture.cnna +++ b/src/test/resources/invalid_tests/UnfinishedArchitecture.cnna @@ -1,14 +1,14 @@ architecture UnfinishedArchitecture(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() -> ( FullyConnected(units=classes, no_bias=true) -> Softmax() -> - out + out1 | ) diff --git a/src/test/resources/invalid_tests/UnknownIO.cnna b/src/test/resources/invalid_tests/UnknownIO.cnna index 9ed800bf359b3a76247ac49a4a97e4723d436dd7..409870861f93de1886f0d436fdb2e5ae72abac98 100644 --- a/src/test/resources/invalid_tests/UnknownIO.cnna +++ b/src/test/resources/invalid_tests/UnknownIO.cnna @@ -1,8 +1,8 @@ architecture UnknownIO(){ - in -> + in1 -> FullyConnected(units=64) -> Tanh() -> FullyConnected(units=10) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/UnknownMethod.cnna b/src/test/resources/invalid_tests/UnknownMethod.cnna index 3d996bc59f183f3dac8d356a052e37758921e211..ec87f5e46e351df85bc672e4d0d7aa049a1d0ffd 100644 --- a/src/test/resources/invalid_tests/UnknownMethod.cnna +++ b/src/test/resources/invalid_tests/UnknownMethod.cnna @@ -1,11 +1,11 @@ architecture UnknownMethod(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> FllyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/UnknownVariableName.cnna b/src/test/resources/invalid_tests/UnknownVariableName.cnna index b4c2d6f41c3dfcf5f0d0941b7a10e111eaf13ba2..9f79070a29ada2190edd0ffbfafa84afe395308c 100644 --- a/src/test/resources/invalid_tests/UnknownVariableName.cnna +++ b/src/test/resources/invalid_tests/UnknownVariableName.cnna @@ -1,11 +1,11 @@ architecture UnknownVariableName(inputs=10){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{2} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{2} out1 - in -> + in1 -> FullyConnected(units=64) -> Tanh() -> FullyConnected(units=classes) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/WrongArgument.cnna b/src/test/resources/invalid_tests/WrongArgument.cnna index 53c41c65fdc45e456151f6b15c1a3c571060646b..893b4ce5b2278b64c41bf65325417d0383d7d64b 100644 --- a/src/test/resources/invalid_tests/WrongArgument.cnna +++ b/src/test/resources/invalid_tests/WrongArgument.cnna @@ -1,11 +1,11 @@ architecture WrongArgument(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, bias=true) -> Tanh(asd=1) -> FullyConnected(unit=classes) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/WrongIOType.cnna b/src/test/resources/invalid_tests/WrongIOType.cnna index 9994cd0e1a47da7a2916143fc006c69c7736196a..11dae442e88949c498fd0510c192d4eb509b98f0 100644 --- a/src/test/resources/invalid_tests/WrongIOType.cnna +++ b/src/test/resources/invalid_tests/WrongIOType.cnna @@ -1,11 +1,11 @@ architecture WrongIOType(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Relu() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/invalid_tests/WrongRangeOperator.cnna b/src/test/resources/invalid_tests/WrongRangeOperator.cnna index 463fc14cedbcf3e5fc9c9abf96330cfe9fd7bb03..d6ddac77f9ccb13988c0d92ece35b702cc365d1e 100644 --- a/src/test/resources/invalid_tests/WrongRangeOperator.cnna +++ b/src/test/resources/invalid_tests/WrongRangeOperator.cnna @@ -1,11 +1,11 @@ architecture WrongRangeOperator(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> FullyConnected(units=[64->..|65]) -> Tanh() -> FullyConnected(units=[classes |..-> classes + 1] ) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/valid_tests/SimpleNetworkLinear.cnna b/src/test/resources/valid_tests/SimpleNetworkLinear.cnna index ffbcf74560e4f0a3862f75f0276c537b7834dc55..cbb8a38bc79bfc28550aef7f6ede8755de278d04 100644 --- a/src/test/resources/valid_tests/SimpleNetworkLinear.cnna +++ b/src/test/resources/valid_tests/SimpleNetworkLinear.cnna @@ -1,10 +1,10 @@ architecture SimpleNetworkLinear(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(-oo:oo)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(-oo:oo)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/valid_tests/SimpleNetworkRelu.cnna b/src/test/resources/valid_tests/SimpleNetworkRelu.cnna index b4f88909eedc0d4118ee584b37d9ee80f3182d26..9d8354ce52cfd5e3695842e303ec748e03ba3de2 100644 --- a/src/test/resources/valid_tests/SimpleNetworkRelu.cnna +++ b/src/test/resources/valid_tests/SimpleNetworkRelu.cnna @@ -1,11 +1,11 @@ architecture SimpleNetworkRelu(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:oo)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:oo)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Relu() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/valid_tests/SimpleNetworkSigmoid.cnna b/src/test/resources/valid_tests/SimpleNetworkSigmoid.cnna index b8d2652269cdfffd42dd493d0ddb7fef9eaa3cb5..08098a6bb67116d5b7b6d157c843c94aed593f99 100644 --- a/src/test/resources/valid_tests/SimpleNetworkSigmoid.cnna +++ b/src/test/resources/valid_tests/SimpleNetworkSigmoid.cnna @@ -1,11 +1,11 @@ architecture SimpleNetworkSigmoid(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Sigmoid() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/valid_tests/SimpleNetworkSoftmax.cnna b/src/test/resources/valid_tests/SimpleNetworkSoftmax.cnna index f130e86a629365834201c3720ef7ace334332aa2..5c0643c8d658bc48aef4a7a11b038b0cd99d11f4 100644 --- a/src/test/resources/valid_tests/SimpleNetworkSoftmax.cnna +++ b/src/test/resources/valid_tests/SimpleNetworkSoftmax.cnna @@ -1,11 +1,11 @@ architecture SimpleNetworkSoftmax(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(0:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(0:1)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Softmax() -> - out + out1 } \ No newline at end of file diff --git a/src/test/resources/valid_tests/SimpleNetworkTanh.cnna b/src/test/resources/valid_tests/SimpleNetworkTanh.cnna index 6d9c567c9b097ba2782e8e5fde57012cfb0c13ca..bd1ffec3b65d7430fd375f183e51b197f39dcd2d 100644 --- a/src/test/resources/valid_tests/SimpleNetworkTanh.cnna +++ b/src/test/resources/valid_tests/SimpleNetworkTanh.cnna @@ -1,11 +1,11 @@ architecture SimpleNetworkTanh(inputs=10, classes=2){ - def input Q(-oo:+oo)^{inputs} in - def output Q(-1:1)^{classes} out + def input Q(-oo:+oo)^{inputs} in1 + def output Q(-1:1)^{classes} out1 - in -> + in1 -> FullyConnected(units=64, no_bias=true) -> Tanh() -> FullyConnected(units=classes, no_bias=true) -> Tanh() -> - out + out1 } \ No newline at end of file