init tensor, class tensor implemented