Neural network Bidirectional Associative Memory(BAM)