2021
06-23
06-23
pytorch_detach 切断网络反传方式
detach官方文档中,对这个方法是这么介绍的。detach=_add_docstr(_C._TensorBase.detach,r"""ReturnsanewTensor,detachedfromthecurrentgraph.Theresultwillneverrequiregradient...note::ReturnedTensorusesthesamedatatensorastheoriginalone.In-placemodificationsoneitherofthemwillbeseen,andmaytriggererrorsincorrectnesschecks.""")返回...
继续阅读 >