Hvass-Labs / TensorFlow-Tutorials

TensorFlow Tutorials with YouTube Videos
MIT License
9.28k stars 4.19k forks source link

modified nlp code to remove errors in Tensorflow 2.0 #118

Closed sankalp24 closed 4 years ago

sankalp24 commented 4 years ago

FIX FOR: Failed to find data adapter that can handle input:<class'numpy.ndarray'> Tensorflow 2.0 takes y_train and y_test only when they are numpy arrays. Therefore it shows the above error when y_train and y_test arent converted into the desired form. Converting them into numpy arrays solves the issue.

Hvass-Labs commented 4 years ago

Thanks for the fix. I haven't seen this PR before now. I have just now updated several of the Notebooks to support TF2, including this one.