Function _verify_input_and_hidden_shape

Source
pub fn _verify_input_and_hidden_shape<D>(input: D, hidden: D) -> bool
where D: Dimension,
Expand description

verify if the input and hidden dimensions are compatible by checking:

  1. they have the same dimensionality
  2. if the the number of dimensions is greater than one, the hidden layer should be square
  3. the finaly dimension of the input is equal to one hidden dimension