Merge

tflearn.layers.merge_ops.merge (tensors_list, mode, axis=1, name='Merge')

Merge a list of Tensor into a single one. A merging 'mode' must be specified, check below for the different options.

Input

List of Tensors.

Output

Merged Tensors.

Arguments

  • tensors_list: A list of Tensor, A list of tensors to merge.
  • mode: str. Merging mode, it supports:
'concat': concatenate outputs along specified axis
'elemwise_sum': outputs element-wise sum
'elemwise_mul': outputs element-wise sum
'sum': outputs element-wise sum along specified axis
'mean': outputs element-wise average along specified axis
'prod': outputs element-wise multiplication along specified axis
'max': outputs max elements along specified axis
'min': outputs min elements along specified axis
'and': `logical and` btw outputs elements along specified axis
'or': `logical or` btw outputs elements along specified axis
  • axis: int. Represents the axis to use for merging mode. In most cases: 0 for concat and 1 for other modes.
  • name: A name for this layer (optional). Default: 'Merge'.

Merge Outputs

tflearn.layers.merge_ops.merge_outputs (tensor_list, name='MergeOutputs')

A layer that concatenate all outputs of a network into a single tensor.

Input

List of Tensors [shape].

Output

Concatenated Tensors [nb_tensors, shape].

Arguments

  • tensor_list: list of Tensor. The network outputs.
  • name: str. A name for this layer (optional).

Returns

A Tensor.