Unable to save model
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- keras, python, tensorflow
- Domain
- machine-learning
Research direction
Start with the linked Colab notebook and reproduce the model construction and model.save call under TensorFlow 2.11.0. Inspect the save failure around the GDN layers and Keras Sequential model; done means establishing the reproducible behavior and validating that the model can be saved successfully.
Written by the indexing model from the issue text.
Description
I'm creating a model to decompress my image in TF using Conv2DTranspose and GDN layer. My architecture looks like this:
import os
import tensorflow as tf
from tensorflow_compression import layers
from tensorflow.keras.layers import Conv2DTranspose
from tensorflow.keras.models import Sequential
network_channels = 128
compression_channels = 192
in_channels = 3
gdn_layer_1 = layers.GDN(inverse=True, rectify=False, data_format = "channels_first")
gdn_layer_2 = layers.GDN(inverse=True, rectify=False, data_format = "channels_first")
gdn_layer_3 = layers.GDN(inverse=True, rectify=False, data_format = "channels_first")
model = Sequential()
model.add(Conv2DTranspose(network_channels, (5, 5), strides = (2, 2), padding= 'same', output_padding = (1,1), data_format = 'channels_first', input_shape=( compression_channels, 1, 1)))
model.add(gdn_layer_1)
model.add(Conv2DTranspose(network_channels, (5, 5), strides = (2, 2), padding= 'same', output_padding = (1,1), data_format = 'channels_first'))
model.add(gdn_layer_2)
model.add(Conv2DTranspose(network_channels, (5, 5), strides = (2, 2), padding= 'same', output_padding = (1,1), data_format = 'channels_first'))
model.add(gdn_layer_3)
model.add(Conv2DTranspose(in_channels, (5, 5), strides = (2, 2), padding= 'same', output_padding = (1,1), data_format = 'channels_first'))
model.summary()

When I'm saving my model using the below command.
model.save(os.path.join("./tf_model"))
It's resulting in this issue:

My TF version is 2.11.0. I'm also attaching link to Colab Notebook to replicate the issue.
- Dominant language
- Python
- Stars
- 923
- Forks
- 258
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from tensorflow/compression
-
IGDN Open
Difficulty 3/5 1-2 days Newbie friendliness 35/100
tensorflow/compression#192 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
tensorflow/compression#188 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
tensorflow/compression#187 ·
-
安卓 Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
tensorflow/compression#185 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
tensorflow/compression#179 · 4 reactions ·
All issues in tensorflow/compression
Similar issues
-
sponsored
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Diaoul/subliminal#1382 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
triage/confirmed
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
agentscope-ai/agentscope#2775 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100