tensorflow / tensorflow/model-optimization

Issue loading model with Conv2DTranspose

Aperta
#751 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug
Lingua principale
Python
Stelle
1.6k
Fork
349
Merge medio
3g 2h
PR unite (30g)
1

Descrizione

Describe the bug
When loading a saved model (.h5 format and SaveModel format) with a Conv2DTranspose layer, there is an error.

System information

TensorFlow version (installed from source or binary): 2.4.2

TensorFlow Model Optimization version (installed from source or binary): 0.6

Python version: 3.7

Describe the expected behavior
The model should be loading

Describe the current behavior
The model does not load. Error message with .h5 model:

ValueError: Unknown object: Default8BitConvTransposeQuantizeConfig

Error Message using SaveModel format:

KeyError: '__inference_semseg/upsample_4/conv2dtranspose_layer_call_fn_123124420'

I am loading the model such as:

with tfmot.quantization.keras.quantize_scope():
    model = tf.keras.models.load_model(args.model_path, compile=False)

Additional Information*
I am not completely confident if Conv2DTranspose is fully supported officially. I could not find a clear docu about supported layers. If it is not, then it might make sense to inform the user about it during training.

semseg_model_fails_to_load.zip

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproducete il problema utilizzando il file semseg_model_fails_to_load.zip allegato e la configurazione indicata con TensorFlow 2.4.2 e TensorFlow Model Optimization 0.6. Iniziate con tfmot.quantization.keras.quantize_scope() e tf.keras.models.load_model() per entrambi i formati H5 e SavedModel. Il lavoro è completato quando i modelli Conv2DTranspose vengono caricati correttamente oppure quando il comportamento dei layer non supportati durante l’addestramento o il caricamento viene riportato chiaramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
keras, python, tensorflow
Ambito
machine-learning
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.