output_shape = self.get_output_shape_for(input_shape)
self.v_thresh = shared_x(settings["v_thresh"], name="v_thresh")
self.tau_refrac = tau_refrac
self.mem = theano.shared(np.zeros(output_shape, floatX))
self.layer_type = self.__class__.__name__
// To save memory and computations, allocate only where needed:
if settings["tau_refrac"] > 0:
self.refrac_until = theano.shared(np.zeros(output_shape, floatX))
After Change
self.v_thresh = theano.shared(settings["v_thresh"])
self.tau_refrac = tau_refrac
self.mem = k.zeros(output_shape)
self.time = theano.shared(np.float32(0))
// To save memory and computations, allocate only where needed:
if settings["tau_refrac"] > 0:
self.refrac_until = k.zeros(output_shape)
if settings["verbose"] > 1: