Commit 828967a3 authored by lr119628's avatar lr119628
Browse files

[update] streamlining, removed unneccesary .ftl templates

parent 80d43a97
Pipeline #524619 failed with stage
in 33 seconds
...@@ -88,8 +88,6 @@ public class CNNArch2GluonTemplateController extends CNNArchTemplateController { ...@@ -88,8 +88,6 @@ public class CNNArch2GluonTemplateController extends CNNArchTemplateController {
this.worked_list.add(layer.getName()); this.worked_list.add(layer.getName());
} }
layer.setArtificial(originalArtificialState); layer.setArtificial(originalArtificialState);
}else {
include(TEMPLATE_ELEMENTS_DIR_PATH, "ArtificialArch", writer, netDefinitionMode);
} }
}else{ }else{
include((ArchitectureElementSymbol) layer.getResolvedThis().get(), writer, netDefinitionMode); include((ArchitectureElementSymbol) layer.getResolvedThis().get(), writer, netDefinitionMode);
......
...@@ -13,6 +13,8 @@ from mxnet import gluon, nd ...@@ -13,6 +13,8 @@ from mxnet import gluon, nd
from mxnet.gluon import nn, HybridBlock from mxnet.gluon import nn, HybridBlock
from numpy import log, product,prod,sqrt from numpy import log, product,prod,sqrt
from mxnet.ndarray import zeros,zeros_like from mxnet.ndarray import zeros,zeros_like
sys.path.insert(1, '${tc.architecture.getAdaNetUtils()}')
from AdaNetConfig import AdaNetConfig
</#if> </#if>
<#if tc.architecture.customPyFilesPath??> <#if tc.architecture.customPyFilesPath??>
sys.path.insert(1, '${tc.architecture.customPyFilesPath}') sys.path.insert(1, '${tc.architecture.customPyFilesPath}')
...@@ -550,22 +552,24 @@ class Net_${networkInstruction?index}(gluon.HybridBlock): ...@@ -550,22 +552,24 @@ class Net_${networkInstruction?index}(gluon.HybridBlock):
return self.dummy(x) return self.dummy(x)
class DataClass_${networkInstruction?index}: class DataClass_${networkInstruction?index}:
""" """
this object holds all the necessary information for AdaNet this object holds all the necessary information for AdaNet
""" """
def __init__(self, **kwargs): def __init__(self, **kwargs):
FullyConnected = AdaNetConfig.DEFAULT_BLOCK.value
<#if outblock.isPresent()> <#if outblock.isPresent()>
self.outBlock = ${tc.include(outblock.get(),"ADANET_CONSTRUCTION")} self.outBlock = ${outblock.get().name}
<#else> <#else>
self.outBlock = None self.outBlock = None
</#if> </#if>
<#if inblock.isPresent()> <#if inblock.isPresent()>
self.inBlock = ${tc.include(inblock.get(),"ADANET_CONSTRUCTION")} self.inBlock = ${inblock.get().name}
<#else> <#else>
self.inBlock = None self.inBlock = None
</#if> </#if>
<#if block.isPresent()> <#if block.isPresent()>
self.block = ${tc.include(block.get(),"ADANET_CONSTRUCTION")} self.block = ${block.get().name}
<#else> <#else>
self.block = None self.block = None
</#if> </#if>
......
<#assign name = element.element.name>
<#if mode == "ADANET_CONSTRUCTION">
${name}
</#if>
\ No newline at end of file
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