torch.detach()
作用
Returns a new Tensor, detached from the current graph.
返回一个新的Tensor, 从原有的图中剥离。
The result will never require gradient.
并且该Tensor不自动计算梯度。
Returns a new Tensor, detached from the current graph.
返回一个新的Tensor, 从原有的图中剥离。
The result will never require gradient.
并且该Tensor不自动计算梯度。