Back

torch.detach()

torch.detach()

作用

Returns a new Tensor, detached from the current graph.

返回一个新的Tensor, 从原有的图中剥离。

The result will never require gradient.

并且该Tensor不自动计算梯度。

Licensed under CC BY-NC-SA 4.0
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy