diff --git a/courses/udacity_intro_to_tensorflow_for_deep_learning/l02c01_celsius_to_fahrenheit.ipynb b/courses/udacity_intro_to_tensorflow_for_deep_learning/l02c01_celsius_to_fahrenheit.ipynb index 7f8ecb29336..ee39ee532ee 100644 --- a/courses/udacity_intro_to_tensorflow_for_deep_learning/l02c01_celsius_to_fahrenheit.ipynb +++ b/courses/udacity_intro_to_tensorflow_for_deep_learning/l02c01_celsius_to_fahrenheit.ipynb @@ -356,7 +356,7 @@ }, "outputs": [], "source": [ - "print(model.predict([100.0]))" + "print(model.predict(np.array([100.0])))" ] }, { @@ -432,7 +432,7 @@ "model.compile(loss='mean_squared_error', optimizer=tf.keras.optimizers.Adam(0.1))\n", "model.fit(celsius_q, fahrenheit_a, epochs=500, verbose=False)\n", "print(\"Finished training the model\")\n", - "print(model.predict([100.0]))\n", + "print(model.predict(np.array([100.0])))\n", "print(\"Model predicts that 100 degrees Celsius is: {} degrees Fahrenheit\".format(model.predict([100.0])))\n", "print(\"These are the l0 variables: {}\".format(l0.get_weights()))\n", "print(\"These are the l1 variables: {}\".format(l1.get_weights()))\n",