return outputs
def _add_node(self, input_tensors, output_tensors):
inputs_list = input_tensors if isinstance(input_tensors, list) else [input_tensors]
outputs_list = output_tensors if isinstance(output_tensors, list) else [output_tensors]
if self.__class__.__name__ in tl.layers.inputs.__all__:
// for InputLayer, there should be no in_nodes
After Change
return outputs
def _add_node(self, input_tensors, output_tensors):
inputs_list = tolist(input_tensors) // input_tensors if isinstance(input_tensors, list) else [input_tensors]
outputs_list = tolist(output_tensors) // output_tensors if isinstance(output_tensors, list) else [output_tensors]
if self.__class__.__name__ in tl.layers.inputs.__all__:
// for InputLayer, there should be no in_nodes
in_nodes = []
in_tensor_idxes = [0]
else:
in_nodes = [tensor._info[0] for tensor in inputs_list]
in_tensor_idxes = [tensor._info[1] for tensor in inputs_list]
node_index = len(self._nodes)
new_node = LayerNode(self, node_index, in_nodes, inputs_list, outputs_list, in_tensor_idxes)
self._nodes.append(new_node)