From 4952ead09403384f2697f95a39ea4881caa36bda Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Thu, 1 Sep 2022 16:02:37 +0100 Subject: [PATCH] ai: try the nonlocal keyword? I'm unsure what's going on here ....clearly I need to read up on scoping in python. --- aimodel/src/lib/ai/components/convnext.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aimodel/src/lib/ai/components/convnext.py b/aimodel/src/lib/ai/components/convnext.py index 7ab29e3..7858d28 100644 --- a/aimodel/src/lib/ai/components/convnext.py +++ b/aimodel/src/lib/ai/components/convnext.py @@ -30,6 +30,8 @@ def make_convnext(input_shape, arch_name="convnext_tiny", **kwargs): input_shape (int[]): The input shape of the tensor that will be fed to the ConvNeXt model. This is necessary as we make the model using the functional API and thus we need to make an Input layer. arch_name (str, optional): The name of the preset ConvNeXt model architecture to use. Defaults to "convnext_tiny". """ + nonlocal next_model_number + layer_in = tf.keras.layers.Input( shape = input_shape )