(self, metadata)
Log activations.
Log activations.
Log activations .
def on_batch_end(self, metadata):
        """Log activations."""
        timestamps = metadata.get('timestamps')
        weights = metadata.get('weights')

        # cache weights
        self.weights.append(pd.DataFrame(weights.detach().cpu().numpy(), index=timestamps))

        # add activations
        self._add_activations(metadata)
def on_batch_end ( self , metadata ) : timestamps = metadata . get ( 'timestamps' ) weights = metadata . get ( 'weights' ) # cache weights self . weights . append ( pd . DataFrame ( weights . detach ( ) . cpu ( ) . numpy ( ) , index = timestamps ) ) # add activations self . _add_activations ( metadata )