nngeometry/object/vector.py
def detach(self):
        """
        Detachs the current PVector from the computation graph
        """
        if self.dict_repr is not None:
            dict_detach = dict()
            for k, v in self.dict_repr.items():
                if len(v) == 2:
                    dict_detach[k] = (v[0].detach(), v[1].detach())
                else:
                    dict_detach[k] = (v[0].detach(),)
            return PVector(self.layer_collection, dict_repr=dict_detach)
        if self.vector_repr is not None:
            return PVector(self.layer_collection,
                           vector_repr=self.vector_repr.detach())

        Detachs the current PVector from the computation graph
        
Detachs the current PVector from the computation graph
Detachs the current PVector from the computation graph
def detach(self):
        if self.dict_repr is not None:
            dict_detach = dict()
            for k, v in self.dict_repr.items():
                if len(v) == 2:
                    dict_detach[k] = (v[0].detach(), v[1].detach())
                else:
                    dict_detach[k] = (v[0].detach(),)
            return PVector(self.layer_collection, dict_repr=dict_detach)
        if self.vector_repr is not None:
            return PVector(self.layer_collection,
                           vector_repr=self.vector_repr.detach())
def detach ( self ) : if self . dict_repr is not None : dict_detach = dict ( ) for k , v in self . dict_repr . items ( ) : if len ( v ) == 2 : dict_detach [ k ] = ( v [ 0 ] . detach ( ) , v [ 1 ] . detach ( ) ) else : dict_detach [ k ] = ( v [ 0 ] . detach ( ) , ) return PVector ( self . layer_collection , dict_repr = dict_detach ) if self . vector_repr is not None : return PVector ( self . layer_collection , vector_repr = self . vector_repr . detach ( ) )
Detachs the current PVector from the computation graph
Detachs the current PVector from the computation graph
"""
        Detachs the current PVector from the computation graph
        """
self