The model worked well before optimization step. However, when I want to optimize my model, the error message showed up:
ValueError: Incompatible shapes betwe