Commit c20c7843 authored by lr119628's avatar lr119628
Browse files

[update] changed artificial_layer to architecture_defined_block

parent ec4ac80f
<#assign input = element.inputs[0]>
<#if mode == "ARCHITECTURE_DEFINITION">
self.${element.name} = artificial_layer_${element.element.name}(<#list element.element.arguments as arg>${arg}=${arg}, </#list>)
self.${element.name} = architecture_defined_block_${element.element.name}()
#${element.name}, output shape: {<#list element.element.outputTypes as type>[${tc.join(type.dimensions, ",")}]</#list>}
<#elseif mode == "FORWARD_FUNCTION">
${element.name} = self.${element.name}(${input})
......
......@@ -3,9 +3,9 @@
<#assign name = element.element.name>
<#assign args = element.element.arguments>
class artificial_layer_${name}(gluon.HyrbidBlock):
def __init__(self, <#list args as arg>${arg}, </#list>, **kwargs):
super(artificial_layer_${name}, self).__init__(**kwargs)
class architecture_defined_block_${name}(gluon.HyrbidBlock):
def __init__(self, **kwargs):
super(architecture_defined_block_${name}, self).__init__(**kwargs)
with self.name_scope():
${tc.include(element.element,"ARCHITECTURE_DEFINITION")}
pass
......
Supports Markdown
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