Code runs in PyCharm but not Jupyter

Not sure why this happens, but maybe try deleting the theano cache and reset your python environment if necessary