quadraticLayer
Quadratic layer for actor or critic network
Description
A quadratic layer takes an input vector and outputs a vector of quadratic monomials constructed from the input elements. This layer is useful when you need a layer whose output is a quadratic function of its inputs. For example, to recreate the structure of quadratic value functions such as those used in LQR controller design.
For example, consider an input vectorU = [u1 u2 u3]
. For this input, a quadratic layer gives the outputY = [u1*u1 u1*u2 u2*u2 u1*u3 u2*u3 u3*u3]
. For an example that uses aQuadraticLayer
, seeTrain DDPG Agent to Control Double Integrator System.
Note
TheQuadraticLayer
layer does not support inputs coming directly or indirectly from afeatureInputLayer
orsequenceInputLayer
.
The parameters of aQuadraticLayer
object are not learnable.
Creation
Description
creates a quadratic layer with default property values.qLayer
= quadraticLayer
setspropertiesusing name-value pairs. For example,qLayer
= quadraticLayer (Name,Value
)quadraticLayer('Name','quadlayer')
creates a quadratic layer and assigns the name'quadlayer'
.