| (:code:`torch.Tensor`): Tensors of shape :code:`[time, n_1, ..., n_k]` of Bernoulli-distributed spikes.
"""
if "max_prob" in kwargs:
max_prob = kwargs["max_prob"]
else:
max_prob = 1.0
for i in range(len(data)):
yield bernoulli(data[i], time, max_prob=max_prob) // Encode datum as Bernoulli spike trains.
def poisson(datum, time, **kwargs):
After Change
"""
// Setting kwargs.
max_prob = kwargs.get("max_prob", 1.0)
for i in range(len(data)):
yield bernoulli(data[i], time, max_prob=max_prob) // Encode datum as Bernoulli spike trains.