torch.ger(vec1, vec2, out=None) → Tensor Outer product of vec1 and vec2. If vec1 is a vector of size nn and vec2 is a vector of size mm, then out must be a matrix of size (n×m). Parameters: vec1 (Tensor) – 1-D input vector vec2 (Tensor) – 1-D input v…
0 - inplace 在pytorch中,nn.ReLU(inplace=True)和nn.LeakyReLU(inplace=True)中存在inplace字段.该参数的inplace=True的意思是进行原地操作,例如: x=x+5是对x的原地操作 y=x+5,x=y不是对x的原地操作 所以,如果指定inplace=True,则对于上层网络传递下来的tensor直接进行修改,可以少存储变量y,节省运算内存. inplace=True means that it will modify th…