Effective Learning Of Descriptive And Generator Models And Learning Representations For Grid Cells And V1 Cells