in LaNAS/Distributed_LaNAS/clientX/nasnet_set.py [0:0]
def gen_code(max_node=Max_node):
normal_node = [[-1 for col in range(4)] for row in range(max_node)]
reduction_node = [[-1 for col in range(4)] for row in range(max_node)]
for i in range(max_node):
for j in range(4):
if j <= 1:
normal_node[i][j] = random.randint(0, len(operations) - 1)
reduction_node[i][j] = random.randint(0, len(operations) - 1)
else:
normal_node[i][j] = random.randint(0, i+1)
reduction_node[i][j] = random.randint(0, i+1)
concat_code = [normal_node, reduction_node]
return concat_code