# Tensor Product Layer

The following layer is a helper function for easily constructing a TensorLayer, which takes as input an array of n tensor product basis, $[B_1, B_2, ..., B_n]$, a data point x, computes $z[i] = W[i,:] ⨀ [B_1(x[1]) ⨂ B_2(x[2]) ⨂ ... ⨂ B_n(x[n])]$, where W is the layer's weight, and returns [z[1], ..., z[out]].

`DiffEqFlux.TensorLayer`

— TypeConstructs the Tensor Product Layer, which takes as input an array of n tensor product basis, [B*1, B*2, ..., B*n] a data point x, computes z[i] = W[i,:] ⨀ [B*1(x[1]) ⨂ B*2(x[2]) ⨂ ... ⨂ B*n(x[n])], where W is the layer's weight, and returns [z[1], ..., z[out]].

`TensorLayer(model,out,p=nothing)`

Arguments:

`model`

: Array of TensorProductBasis [B*1(n*1), ..., B*k(n*k)], where k corresponds to the dimension of the input.`out`

: Dimension of the output.`p`

: Optional initialization of the layer's weight. Initizalized to 0 by default.