Merge

Average

layer eddl::Average(const vector<layer> &layers, string name = "")

Layer that averages a list of layer inputs.

It takes a list of layers as input, all of the same shape, and returns a single tensor (also of the same shape).

Parameters
  • layers – List of layers

  • name – A name for the operation

Returns

Output of average operation with all input layers

Example:

layer in1 = Input({3,584,584});
layer in2 = Input({3,584,584});

layer l = Average({in1,in2});

Concat

layer eddl::Concat(const vector<layer> &layers, unsigned int axis = 0, string name = "")

Layer that concatenates a list of inputs.

It takes a list of layers as input and returns a single tensor that is the concatenation of all the input layers.

Parameters
  • layers – List of layers

  • axis – Axis along which to concatenate (batch is ignored; “-1” selects last axis)

  • name – A name for the operation

Returns

Output of concatenation operation with all input layers

Example:

layer in1 = Input({3,584,584});
layer in2 = Input({1,584,584});

layer l = Concat({in1,in2});

MatMul

layer eddl::MatMul(const vector<layer> &layers, string name = "")

Multiplication of matrices.

It takes a list of layers as input, all of the same shape, and returns a single tensor (also of the same shape).

Parameters
  • layers – List of layers

  • name – A name for the operation

Returns

Output of MatMul operation

Example:

layer in1 = Input({3,584,584});
layer in2 = Input({3,584,584});

layer l = MatMul({in1,in2});

Maximum

layer eddl::Maximum(const vector<layer> &layers, string name = "")

Layer that computes the maximum (element-wise) of a list of inputs.

It takes a list of tensors as input, all of the same shape, and returns a single tensor (also of the same shape).

Parameters
  • layers – List of layers

  • name – A name for the operation

Returns

Output of Maximum operation with all input layers

Example:

layer in1 = Input({3,584,584});
layer in2 = Input({3,584,584});

layer l = Maximum({in1,in2});

Minimum

layer eddl::Minimum(const vector<layer> &layers, string name = "")

Layer that computes the minimum (element-wise) of a list of inputs.

It takes a list of tensors as input, all of the same shape, and returns a single tensor (also of the same shape).

Parameters
  • layers – List of layers

  • name – A name for the operation

Returns

Output of Minimum operation with all input layers

Example:

layer in1 = Input({3,584,584});
layer in2 = Input({3,584,584});

layer l = Minimum({in1,in2});