Tensorflow custom learning rate scheduler gives unexpected EagerTensor type error