Skip to content

Improve Error Messages for Distributional Losses (Fixes #308)#357

Open
natinew77-creator wants to merge 2 commits intogoogle-deepmind:masterfrom
natinew77-creator:fix/dx-improvements
Open

Improve Error Messages for Distributional Losses (Fixes #308)#357
natinew77-creator wants to merge 2 commits intogoogle-deepmind:masterfrom
natinew77-creator:fix/dx-improvements

Conversation

@natinew77-creator
Copy link

Refines acme.tf.losses.distributional.categorical to raise a descriptive TypeError if inputs do not have the expected values and logits properties.

This addresses Issue #308, where users experienced confusing AttributeError: 'Tensor' object has no attribute 'values' when inadvertently passing raw Tensors instead of DiscreteValuedDistribution objects. This improved validation provides immediate, actionable feedback to the developer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant