This repo is great, thank you. When I am trying to save checkpoints, I am getting the two issues: one where some layers haven't been built yet. And one where there a non-serialised objects. Have you managed to save this model? Are there some tricks that I'm missing and that you'd be happy to share?
from models.nextvit_tf import nextvit_small
nextvit = nextvit_small(input_shape=(224, 224, 3), num_classes=100)
z = nextvit(np.random.normal(size=(8, 224, 224, 3)))
# train...
nextvit.save("tmp_model")
WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
WARNING:tensorflow:Compiled the loaded model, but the compiled metrics have yet to be built. `model.compile_metrics` will be empty until you train or evaluate the model.
WARNING:tensorflow:Skipping full serialization of Keras layer <keras.src.layers.convolutional.conv2d.Conv2D object at 0x7f7788551180>, because it is not built.
WARNING:tensorflow:Skipping full serialization of Keras layer <keras.src.layers.convolutional.conv2d.Conv2D object at 0x7f7788551180>, because it is not built.
WARNING:tensorflow:Skipping full serialization of Keras layer <keras.src.layers.normalization.batch_normalization.BatchNormalization object at 0x7f7788550be0>, because it is not built.
WARNING:tensorflow:Skipping full serialization of Keras layer <keras.src.layers.normalization.batch_normalization.BatchNormalization object at 0x7f7788550be0>, because it is not built.
WARNING:tensorflow:Skipping full serialization of Keras layer <keras.src.layers.convolutional.conv2d.Conv2D object at 0x7f778832ba00>, because it is not built.
...
WARNING:tensorflow:Model's `__init__()` arguments contain non-serializable objects. Please implement a `get_config()` method in the subclassed Model for proper saving and loading. Defaulting to empty config.
WARNING:tensorflow:Model's `__init__()` arguments contain non-serializable objects. Please implement a `get_config()` method in the subclassed Model for proper saving and loading. Defaulting to empty config.
WARNING:tensorflow:Model's `__init__()` arguments contain non-serializable objects. Please implement a `get_config()` method in the subclassed Model for proper saving and loading. Defaulting to empty config.
....