add getDimensionOfWeights()
use immutable data for basic vec,mat,tensor