Quadratic layer for actor or critic network
A QuadraticLayer is a deep neural network layer that takes an
input vector and outputs a vector of quadratic monomials constructed from the input elements.
For example, consider an input vector U = [u1 u2 u3]. For this input, a
quadratic layer gives the output Y = [u1*u1 u1*u2 u2*u2 u1*u3 u2*u3
u3*u3].
The quadratic layer is useful when you need a layer whose output is some quadratic
function of its inputs. For instance, inserting a QuadraticLayer into a
network lets you recreate the structure of quadratic value functions such as those used in LQR
controller design. For an example that uses a QuadraticLayer, see Train DDPG Agent to Control Double Integrator System.
Note
The QuadraticLayer layer does not support inputs coming directly or
indirectly from a featureInputLayer or
sequenceInputLayer.
The parameters of a QuadraticLayer object are not learnable.
creates a quadratic
layer with default property values.qLayer = quadraticLayer
sets properties using
name-value pairs. For example, qLayer = quadraticLayer(Name,Value)quadraticLayer('Name','quadlayer')
creates a quadratic layer and assigns the name 'quadlayer'.