Commit e0c0ac3c authored by lr119628's avatar lr119628
Browse files

[update] removed input block parameter, since it isn't used anymore in AdaNet.ftl

parent 7c16c284
......@@ -540,16 +540,19 @@ class Net_${networkInstruction?index}(gluon.HybridBlock):
super(Net_${networkInstruction?index},self).__init__(**kwargs)
self.AdaNet = True
self.op_names = []
self.candidate_complexities = {}
with self.name_scope():
if operations is None:
operations={'dummy':nn.Dense(units = 10)}
#if operations is None:
# operations={'dummy':nn.Dense(units = 10)}
self.data_shape = <#list networkInstruction.body.getAdaLayer().get().outputTypes as type>(${tc.join(type.dimensions, ",")})</#list>
self.classes = prod(list(self.data_shape))
for name,operation in operations.items():
self.__setattr__(name,operation)
self.op_names.append(name)
if operations is None:
operations={'dummy':nn.Dense(units = 10)}
else:
for name,operation in operations.items():
self.__setattr__(name,operation)
self.op_names.append(name)
self.candidate_complexities[name] = operation.get_complexity()
self.out = nn.Dense(units=self.classes,activation=None,flatten=False)
def hybrid_forward(self,F,x):
......
......@@ -189,9 +189,9 @@ class Builder:
c0_name = f'can0r{self.round}'
c1_name = f'can1r{self.round}'
c0 = CandidateHull(name=c0_name,input=self.input, output=self.output, stack=self.pre_stack,
c0 = CandidateHull(name=c0_name, stack=self.pre_stack,
block_args=self.block_params)
c1 = CandidateHull(name=c1_name,input=self.input, output=self.output, stack=self.pre_stack + 1,
c1 = CandidateHull(name=c1_name, stack=self.pre_stack + 1,
block_args=self.block_params)
self.step += 1
......
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