Class Dense

Inheritance Relationships

Base Types

Class Documentation

class Dense : public marian::LayerBase, public marian::IUnaryLayer

Base class for a fully connected layer.

Implement the operations output = activation(input * weight + bias).

Public Functions

Dense(Ptr<ExpressionGraph> graph, Ptr<Options> options)

Construct a dense layer in the graph.

Parameters
  • graph: The expression graph.

  • options: The options used for this dense layer.

Expr apply(const std::vector<Expr> &inputs)

Apply/Link a vector of dense layers (with the given inputs) to the expression graph.

Return

The expression holding the dense layers

Parameters
  • inputs: The vector of the input expressions

Expr apply(Expr input)

Apply/Link this dense layer (with the given input) to the expression graph.

Return

The expression holding the dense layer

Parameters
  • input: The input expression