Isn't shape[atom_axis] the number of hidden units? Shouldn't len(indices) be the size of the receptive field of a hidden unit, rather than the number of hidden units?