一.Tensor a) 张量是torch的基础数据类型 b) 张量的核心是坐标的改变不会改变自身性质. c) 0阶张量为标量(只有数值,没有方向的量),因为它不随坐标的变化发生改变 d) 一阶张量为矢量(即向量),他也不随坐标变化而发生变化 e) 二阶张量为矩阵 f) 生成tensor时的通用参数 i. 转换数值类型: 常见生成tensor的参数:dtyp
1. torch.renorm(input, p, dim, maxnorm, out=None) → Tensor Returns a tensor where each sub-tensor of input along dimension dim is normalized such that the p-norm of the sub-tensor is lower than the value maxnorm. 解释:返回一个张量,包含规范化后的各个子张量,使得沿着dim维划分的各子张