From ebf6453000eead6a3f2c2019dba5f0125b2c19e9 Mon Sep 17 00:00:00 2001 From: Sebastian Nickels <sn1c@protonmail.ch> Date: Sat, 17 Aug 2019 21:57:19 +0200 Subject: [PATCH] Fixed a syntax error --- src/main/resources/templates/gluon/pythonExecute.ftl | 2 +- .../resources/target_code/CNNSupervisedTrainer_Alexnet.py | 6 +++--- .../CNNSupervisedTrainer_CifarClassifierNetwork.py | 6 +++--- .../resources/target_code/CNNSupervisedTrainer_VGG16.py | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/resources/templates/gluon/pythonExecute.ftl b/src/main/resources/templates/gluon/pythonExecute.ftl index c0093eeb..1f2dcb30 100644 --- a/src/main/resources/templates/gluon/pythonExecute.ftl +++ b/src/main/resources/templates/gluon/pythonExecute.ftl @@ -2,7 +2,7 @@ ${member} = mx.nd.zeroes((${tc.join(tc.getLayerVariableMembers("batch_size")[member], ", ")},), ctx=mx_context) </#list> <#list tc.architecture.outputs as output> - ${tc.getName(output)} = mx.nd.zeroes(((${tc.join(output.ioDeclaration.type.dimensions, ", ")},), ctx=mx_context) + ${tc.getName(output)} = mx.nd.zeroes((${tc.join(output.ioDeclaration.type.dimensions, ", ")},), ctx=mx_context) </#list> <#list tc.architecture.streams as stream> diff --git a/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py b/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py index 0d22884f..51b79769 100644 --- a/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py +++ b/src/test/resources/target_code/CNNSupervisedTrainer_Alexnet.py @@ -136,7 +136,7 @@ class CNNSupervisedTrainer_Alexnet: predictions_label = batch.label[0].as_in_context(mx_context) with autograd.record(): - predictions_ = mx.nd.zeroes(((10,), ctx=mx_context) + predictions_ = mx.nd.zeroes((10,), ctx=mx_context) predictions_ = self._networks[0](data_) @@ -173,7 +173,7 @@ class CNNSupervisedTrainer_Alexnet: ] if True: - predictions_ = mx.nd.zeroes(((10,), ctx=mx_context) + predictions_ = mx.nd.zeroes((10,), ctx=mx_context) predictions_ = self._networks[0](data_) @@ -194,7 +194,7 @@ class CNNSupervisedTrainer_Alexnet: ] if True: - predictions_ = mx.nd.zeroes(((10,), ctx=mx_context) + predictions_ = mx.nd.zeroes((10,), ctx=mx_context) predictions_ = self._networks[0](data_) diff --git a/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py b/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py index 2a8aee06..bf5ee75f 100644 --- a/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py +++ b/src/test/resources/target_code/CNNSupervisedTrainer_CifarClassifierNetwork.py @@ -136,7 +136,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork: softmax_label = batch.label[0].as_in_context(mx_context) with autograd.record(): - softmax_ = mx.nd.zeroes(((10,), ctx=mx_context) + softmax_ = mx.nd.zeroes((10,), ctx=mx_context) softmax_ = self._networks[0](data_) @@ -173,7 +173,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork: ] if True: - softmax_ = mx.nd.zeroes(((10,), ctx=mx_context) + softmax_ = mx.nd.zeroes((10,), ctx=mx_context) softmax_ = self._networks[0](data_) @@ -194,7 +194,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork: ] if True: - softmax_ = mx.nd.zeroes(((10,), ctx=mx_context) + softmax_ = mx.nd.zeroes((10,), ctx=mx_context) softmax_ = self._networks[0](data_) diff --git a/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py b/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py index 7651ff55..d98fe840 100644 --- a/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py +++ b/src/test/resources/target_code/CNNSupervisedTrainer_VGG16.py @@ -136,7 +136,7 @@ class CNNSupervisedTrainer_VGG16: predictions_label = batch.label[0].as_in_context(mx_context) with autograd.record(): - predictions_ = mx.nd.zeroes(((1000,), ctx=mx_context) + predictions_ = mx.nd.zeroes((1000,), ctx=mx_context) predictions_ = self._networks[0](data_) @@ -173,7 +173,7 @@ class CNNSupervisedTrainer_VGG16: ] if True: - predictions_ = mx.nd.zeroes(((1000,), ctx=mx_context) + predictions_ = mx.nd.zeroes((1000,), ctx=mx_context) predictions_ = self._networks[0](data_) @@ -194,7 +194,7 @@ class CNNSupervisedTrainer_VGG16: ] if True: - predictions_ = mx.nd.zeroes(((1000,), ctx=mx_context) + predictions_ = mx.nd.zeroes((1000,), ctx=mx_context) predictions_ = self._networks[0](data_) -- GitLab