For the sake of completeness: detaching a tensor to avoid an inplace operation issue is unfortunately not a solution as described here.
For the sake of completeness: detaching a tensor to avoid an inplace operation issue is unfortunately not a solution as described here.