neuroprob/likelihoods.py
def sample_helper(self, h, b, neuron, samples):
        """
        NLL helper function for sample evaluation. Note the F_mu dimensions here is equal to NxC.
        """
        logp = self.get_logp(h, neuron)
        spikes = self.spikes[b][:, neuron, self.filter_len-1:].to(self.tbin.device)
        if self.trials != 1 and samples > 1 and self.trials < h.shape[0]: # cannot rely on broadcasting
            spikes = spikes.repeat(samples, 1, 1)
        tar = self.counts_to_onehot(spikes)
        
        return logp, tar

        NLL helper function for sample evaluation. Note the F_mu dimensions here is equal to NxC.
        
NLL helper function for sample evaluation. Note the F_mu dimensions here is equal to NxC.
NLL helper function for sample evaluation . Note the F_mu dimensions here is equal to NxC .
def sample_helper(self, h, b, neuron, samples):
        logp = self.get_logp(h, neuron)
        spikes = self.spikes[b][:, neuron, self.filter_len-1:].to(self.tbin.device)
        if self.trials != 1 and samples > 1 and self.trials < h.shape[0]: 
            spikes = spikes.repeat(samples, 1, 1)
        tar = self.counts_to_onehot(spikes)
        return logp, tar
def sample_helper ( self , h , b , neuron , samples ) : logp = self . get_logp ( h , neuron ) spikes = self . spikes [ b ] [ : , neuron , self . filter_len - 1 : ] . to ( self . tbin . device ) if self . trials != 1 and samples > 1 and self . trials < h . shape [ 0 ] : spikes = spikes . repeat ( samples , 1 , 1 ) tar = self . counts_to_onehot ( spikes ) return logp , tar
NLL helper function for sample evaluation.
NLL helper function for sample evaluation .
"""
        NLL helper function for sample evaluation. Note the F_mu dimensions here is equal to NxC.
        """ # cannot rely on broadcasting
self
h
b
neuron
samples