@ Override public void purgeBuffers ( ) { log . info ( "Purging TAD buffers..." ) ; tadCache = new ArrayList <> ( ) ; int numDevices = Nd4j . getAffinityManager ( ) . getNumberOfDevices ( ) ; for ( int i = 0 ; i < numDevices ; i ++ ) { log . info ( "Resetting device: [{}]" , i ) ; tadCache . add ( i , new ConcurrentHashMap < TadDescriptor , Pair < DataBuffer , DataBuffer > > ( ) ) ; } super . purgeBuffers ( ) ; }
This method removes all cached shape buffers