public function layers() : Generator
    {
        yield $this->input;
        
        foreach ($this->hidden as $hidden) {
            yield $hidden;
        }

        yield $this->output;
    }
public function layers() : Generator
    {
        yield $this->input;
        
        foreach ($this->hidden as $hidden) {
            yield $hidden;
        }

        yield $this->output;
    }
public function layers ( ) : Generator { yield $ this -> input ; foreach ( $ this -> hidden as $ hidden ) { yield $ hidden ; } yield $ this -> output ; }
Return all the layers in the network.

@return \Generator
Return all the layers in the network .