pythonExecute.ftl 674 Bytes
Newer Older
1
2
3
<#list tc.getLayerVariableMembers("batch_size")?keys as member>
                    ${member} = mx.nd.zeroes((${tc.join(tc.getLayerVariableMembers("batch_size")[member], ", ")},), ctx=mx_context)
</#list>
4
<#list tc.architecture.outputs as output>
Sebastian Nickels's avatar
Sebastian Nickels committed
5
                    ${tc.getName(output)} = mx.nd.zeroes((${tc.join(output.ioDeclaration.type.dimensions, ", ")},), ctx=mx_context)
6
</#list>
7
8
9
10
11
12
13
14

<#list tc.architecture.streams as stream>
<#if stream.isTrainable()>
                    ${tc.join(tc.getStreamOutputNames(stream), ", ")} = self._networks[${stream?index}](${tc.join(tc.getStreamInputNames(stream), ", ")})
<#else>
${tc.include(stream, "PYTHON_INLINE")}
</#if>
</#list>