Skip to content

Make TensorFlow precision configurable while defaulting to 64-bit #577

Description

@redeboer

TensorWaves currently enables TensorFlow's NumPy behavior with its default 64-bit inference and hard-codes tf.float64 in TFUniformRealNumberGenerator. Users should be able to select 32-bit precision consistently, particularly for autodiff workloads.

Centralize TensorFlow initialization and make the precision configurable, with the following behavior:

  • TensorWaves defaults to 64-bit precision when nothing is specified.
  • Users can explicitly select 32-bit precision through the TensorWaves configuration API.
  • The setting controls both TensorFlow NumPy dtype inference and TFUniformRealNumberGenerator output.
  • Configuration is applied before TensorFlow arrays or compiled functions are created.
  • Tests cover both precision modes, and the behavior is documented.

Metadata

Metadata

Assignees

Labels

✨ FeatureNew feature added to the package

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions