@ Override public MemoryWorkspace notifyScopeBorrowed ( ) { if ( isBorrowed . get ( ) ) throw new ND4JIllegalStateException ( "Workspace [" + id + "]: Can't borrow from borrowed workspace" ) ; borrowingWorkspace = Nd4j . getMemoryManager ( ) . getCurrentWorkspace ( ) ; isBorrowed . set ( true ) ; Nd4j . getMemoryManager ( ) . setCurrentWorkspace ( this ) ; return this ; }
This method TEMPORARY enters this workspace without reset applied