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

execute.ftl 3.11 KB
Newer Older
1
<#list tc.architectureInputSymbols as input>
2 3
    vector<float> ${tc.getName(input)} = CNNTranslator::translate(${input.name}<#if input.arrayAccess.isPresent()>[${input.arrayAccess.get().intValue.get()?c}]</#if>);
</#list>
4 5
<#list tc.getLayerVariableMembers("1", true)?keys as member>
    vector<float> ${member}(${tc.join(tc.getLayerVariableMembers("1", true)[member][0], " * ")});
6
</#list>
7

8
<#list tc.architectureOutputSymbols as output>
9
    vector<float> ${tc.getName(output)}(${tc.join(output.ioDeclaration.type.dimensions, " * ")});
10 11
</#list>

Sebastian N.'s avatar
Sebastian N. committed
12
<#list tc.architecture.networkInstructions as networkInstruction>
Sebastian N.'s avatar
Sebastian N. committed
13 14
<#if networkInstruction.isUnroll()>
<#list networkInstruction.toUnrollInstruction().resolvedBodies as resolvedBody>
15
    _predictor_${networkInstruction?index}_.predict(${tc.join(tc.getStreamInputNames(networkInstruction.body, resolvedBody, false), ", ")}, ${tc.join(tc.getStreamOutputNames(networkInstruction.body, resolvedBody), ", ")});
Sebastian N.'s avatar
Sebastian N. committed
16 17
</#list>
<#else>
Sebastian N.'s avatar
Sebastian N. committed
18
<#if networkInstruction.body.isTrainable()>
19
    _predictor_${networkInstruction?index}_.predict(${tc.join(tc.getStreamInputNames(networkInstruction.body, false), ", ")}, ${tc.join(tc.getStreamOutputNames(networkInstruction.body), ", ")});
20
<#else>
21
<#-- ${tc.include(networkInstruction.body, "CPP_INLINE")}; -->
22
</#if>
Sebastian N.'s avatar
Sebastian N. committed
23
</#if>
24
</#list>
25

26
<#list tc.architectureOutputSymbols as output>
27
<#assign shape = output.ioDeclaration.type.dimensions>
28
<#if shape?size == 1>
29 30 31
<#if (output.ioDeclaration.type.domain.isNaturalNumber() || output.ioDeclaration.type.domain.isWholeNumber())>
    ${output.name}<#if output.arrayAccess.isPresent()>[${output.arrayAccess.get().intValue.get()?c}]</#if> = CNNTranslator::translateToIntCol(${tc.getName(output)}, std::vector<size_t> {${shape[0]?c}});
<#else>
32
    ${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
</#if>
34
</#if>
35
<#if shape?size == 2>
36 37 38
<#if (output.ioDeclaration.type.domain.isNaturalNumber() || output.ioDeclaration.type.domain.isWholeNumber())>
    ${output.name}<#if output.arrayAccess.isPresent()>[${output.arrayAccess.get().intValue.get()?c}]</#if> = CNNTranslator::translateToIntMat(${tc.getName(output)}, std::vector<size_t> {${shape[0]?c}, ${shape[1]?c}});
<#else>
39
    ${output.name}<#if output.arrayAccess.isPresent()>[${output.arrayAccess.get().intValue.get()?c}]</#if> = CNNTranslator::translateToMat(${tc.getName(output)}, std::vector<size_t> {${shape[0]?c}, ${shape[1]?c}});
40
</#if>
41
</#if>
42
<#if shape?size == 3>
43 44 45
<#if (output.ioDeclaration.type.domain.isNaturalNumber() || output.ioDeclaration.type.domain.isWholeNumber())>
    ${output.name}<#if output.arrayAccess.isPresent()>[${output.arrayAccess.get().intValue.get()?c}]</#if> = CNNTranslator::translateToIntCube(${tc.getName(output)}, std::vector<size_t> {${shape[0]?c}, ${shape[1]?c}, ${shape[2]?c}});
<#else>
46
    ${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}});
47 48

</#if>
49 50
</#if>
</#list>