Extracting feature matrix in training implemented