From d09e705a3c2e37a329a3db03669fa99b150af7b3 Mon Sep 17 00:00:00 2001 From: Will Smith Date: Sun, 23 Feb 2025 15:18:27 +0000 Subject: [PATCH] Update Surface_Observation_Prediction_in_Tensorflow.ipynb shape parameter to Input() needs to be an array not a scalar --- .../Surface_Observation_Prediction_in_Tensorflow.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tier_2/deep_learning/Surface_Observation_Prediction_in_Tensorflow.ipynb b/tier_2/deep_learning/Surface_Observation_Prediction_in_Tensorflow.ipynb index ec98279..99d740d 100644 --- a/tier_2/deep_learning/Surface_Observation_Prediction_in_Tensorflow.ipynb +++ b/tier_2/deep_learning/Surface_Observation_Prediction_in_Tensorflow.ipynb @@ -426,7 +426,7 @@ "\n", " # Then just stack layers on top of one another\n", " # the first specifies the shape of the inputs expected input\n", - " model.add(Input(input_shape, name=\"Inputs\"))\n", + " model.add(Input(shape=[input_shape], name=\"Inputs\"))\n", "\n", " # Then we stack on depth number of consectutive dense layers\n", " # To write more compact code we can include the activation\n", @@ -491,7 +491,7 @@ " input_shape: int, width: int, depth: int, activation: str, learning_rate=10**(-3), final_activation: str = \"linear\"\n", "):\n", " # First we create an input layer\n", - " inputs = Input(input_shape, name=\"Inputs\")\n", + " inputs = Input(shape=[input_shape], name=\"Inputs\")\n", "\n", " # Pass it to the hidden variable we will reuse\n", " hidden = inputs\n",