def generate_temporal_basis(self, trajectory_length, n_basis):
        temporal_basis = np.zeros((trajectory_length, n_basis))
        xx = np.linspace(-1, 1, trajectory_length)
        x_centers = np.linspace(-1, 1, n_basis)
        width = (x_centers[1] - x_centers[0])/2.
        for ii in xrange(n_basis):
            temporal_basis[:,ii] = np.exp(-(xx-x_centers[ii])**2 / (2*width**2))
        temporal_basis /= np.sum(temporal_basis, axis=1).reshape((-1,1))
        temporal_basis = temporal_basis.T

        temporal_basis_theano = theano.shared(value=temporal_basis.astype(theano.config.floatX),
            name="temporal basis")
        return temporal_basis_theano
Generate the bump basis functions for temporal readout of mu and sigma.
dataset/ETHPy150Open Sohl-Dickstein/Diffusion-Probabilistic-Models/model.py/DiffusionModel.generate_temporal_basis