public function infer(Matrix $input) : Tensor
    {
        $input = $this->input->infer($input);

        foreach ($this->hidden as $hidden) {
            $input = $hidden->infer($input);
        }

        return $this->output->infer($input);
    }
public function infer(Matrix $input) : Tensor
    {
        $input = $this->input->infer($input);

        foreach ($this->hidden as $hidden) {
            $input = $hidden->infer($input);
        }

        return $this->output->infer($input);
    }
public function infer ( Matrix $ input ) : Tensor { $ input = $ this -> input -> infer ( $ input ) ; foreach ( $ this -> hidden as $ hidden ) { $ input = $ hidden -> infer ( $ input ) ; } return $ this -> output -> infer ( $ input ) ; }
Run an inference pass and return the activations at the output layer.

@param \Rubix\Tensor\Matrix $input
@return \Rubix\Tensor\Matrix
Run an inference pass and return the activations at the output layer .