Aufgrund einer Störung des s3 Storage, könnten in nächster Zeit folgende GitLab Funktionen nicht zur Verfügung stehen: LFS, Container Registry, Job Artifacs, Uploads (Wiki, Bilder, Projekt-Exporte). Wir bitten um Verständnis. Es wird mit Hochdruck an der Behebung des Problems gearbeitet. Weitere Informationen zur Störung des Object Storage finden Sie hier: https://maintenance.itc.rwth-aachen.de/ticket/status/messages/59-object-storage-pilot

Commit 9f39abf2 authored by Sebastian N.'s avatar Sebastian N.
Browse files

No duplicate inputs/outputs and batch_size

parent 904c654d
Pipeline #180600 failed with stages
in 42 seconds
<#list tc.architecture.inputs as input>
<#if tc.getName(input)??>
<#list tc.architectureInputSymbols as input>
vector<float> ${tc.getName(input)} = CNNTranslator::translate(${input.name}<#if input.arrayAccess.isPresent()>[${input.arrayAccess.get().intValue.get()?c}]</#if>);
</#if>
</#list>
<#list tc.getLayerVariableMembers("1")?keys as member>
vector<float> ${member}(${tc.join(tc.getLayerVariableMembers("1")[member], " * ")})
</#list>
<#list tc.getNoDuplicateArchitectureOutputs() as output>
<#if tc.getName(output)??>
<#list tc.architectureOutputSymbols as output>
vector<float> ${tc.getName(output)}(${tc.join(output.ioDeclaration.type.dimensions, " * ")});
</#if>
</#list>
<#list tc.architecture.networkInstructions as networkInstruction>
......@@ -21,8 +17,7 @@ ${tc.include(networkInstruction.body, "CPP_INLINE")}
</#if>
</#list>
<#list tc.architecture.outputs as output>
<#if tc.getName(output)??>
<#list tc.architectureOutputSymbols as output>
<#assign shape = output.ioDeclaration.type.dimensions>
<#if shape?size == 1>
${output.name}<#if output.arrayAccess.isPresent()>[${output.arrayAccess.get().intValue.get()?c}]</#if> = CNNTranslator::translateToCol(${tc.getName(output)}, std::vector<size_t> {${shape[0]?c}});
......@@ -33,5 +28,4 @@ ${tc.include(networkInstruction.body, "CPP_INLINE")}
<#if shape?size == 3>
${output.name}<#if output.arrayAccess.isPresent()>[${output.arrayAccess.get().intValue.get()?c}]</#if> = CNNTranslator::translateToCube(${tc.getName(output)}, std::vector<size_t> {${shape[0]?c}, ${shape[1]?c}, ${shape[2]?c}});
</#if>
</#if>
</#list>
<#list tc.getLayerVariableMembers("batch_size")?keys as member>
${member} = mx.nd.zeros((${tc.join(tc.getLayerVariableMembers("batch_size")[member], ", ")},), ctx=mx_context)
</#list>
<#list tc.architecture.outputs as output>
<#if tc.getName(output)??>
${tc.getName(output)} = mx.nd.zeros((${tc.join(output.ioDeclaration.type.dimensions, ", ")},), ctx=mx_context)
</#if>
<#list tc.architectureOutputSymbols as output>
${tc.getName(output)} = mx.nd.zeros((batch_size, ${tc.join(output.ioDeclaration.type.dimensions, ", ")},), ctx=mx_context)
</#list>
<#list tc.architecture.networkInstructions as networkInstruction>
......
......@@ -136,7 +136,7 @@ class CNNSupervisedTrainer_Alexnet:
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](data_)
......@@ -174,7 +174,7 @@ class CNNSupervisedTrainer_Alexnet:
]
if True:
predictions_ = mx.nd.zeros((10,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
predictions_ = self._networks[0](data_)
......@@ -196,7 +196,7 @@ class CNNSupervisedTrainer_Alexnet:
]
if True:
predictions_ = mx.nd.zeros((10,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
predictions_ = self._networks[0](data_)
......
......@@ -136,7 +136,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork:
softmax_label = batch.label[0].as_in_context(mx_context)
with autograd.record():
softmax_ = mx.nd.zeros((10,), ctx=mx_context)
softmax_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
softmax_ = self._networks[0](data_)
......@@ -174,7 +174,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork:
]
if True:
softmax_ = mx.nd.zeros((10,), ctx=mx_context)
softmax_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
softmax_ = self._networks[0](data_)
......@@ -196,7 +196,7 @@ class CNNSupervisedTrainer_CifarClassifierNetwork:
]
if True:
softmax_ = mx.nd.zeros((10,), ctx=mx_context)
softmax_ = mx.nd.zeros((batch_size, 10,), ctx=mx_context)
softmax_ = self._networks[0](data_)
......
......@@ -136,7 +136,7 @@ class CNNSupervisedTrainer_VGG16:
predictions_label = batch.label[0].as_in_context(mx_context)
with autograd.record():
predictions_ = mx.nd.zeros((1000,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 1000,), ctx=mx_context)
predictions_ = self._networks[0](data_)
......@@ -174,7 +174,7 @@ class CNNSupervisedTrainer_VGG16:
]
if True:
predictions_ = mx.nd.zeros((1000,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 1000,), ctx=mx_context)
predictions_ = self._networks[0](data_)
......@@ -196,7 +196,7 @@ class CNNSupervisedTrainer_VGG16:
]
if True:
predictions_ = mx.nd.zeros((1000,), ctx=mx_context)
predictions_ = mx.nd.zeros((batch_size, 1000,), ctx=mx_context)
predictions_ = self._networks[0](data_)
......
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