10000 Serializing a `tf.keras.Model` in half-precision · Issue #65 · keras-team/tf-keras · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Serializing a tf.keras.Model in half-precision #65
Open
@sayakpaul

Description

@sayakpaul

System information.

  • Have I written custom code (as opposed to using a stock example script provided in Keras): Yes
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Colab
  • TensorFlow installed from (source or binary): Binary
  • TensorFlow version (use command below): 2.11.0
  • Python version: 3.8.16
  • Bazel version (if compiling from source):
  • GPU model and memory:
  • Exact command to reproduce:

Describe the problem.

After setting the precision policy to be mixed_float16 the serialized model is not in half-precision.

Is this expected? For larger models (Stable Diffusion, for example), allowing users to serialize models in half-precision can be quite beneficial.

Describe the current behavior.

The model gets serialized in full precision.

Describe the expected behavior.

Users should have a way to serialize a model in half-precision.

Contributing.

  • Do you want to contribute a PR? (yes/no): no
  • If yes, please read this page for instructions
  • Briefly describe your candidate solution(if contributing):

Standalone code to reproduce the issue.

Colab Gist: https://colab.research.google.com/gist/sayakpaul/c7abb6f8057ba21857985de5e26a22d8/scratchpad.ipynb

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0