Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model.add_loss is not documented #65160

Closed
piyushsrv opened this issue Apr 5, 2024 · 4 comments
Closed

Model.add_loss is not documented #65160

piyushsrv opened this issue Apr 5, 2024 · 4 comments
Assignees
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author type:bug Bug type:docs-bug Document issues

Comments

@piyushsrv
Copy link

Issue type

Documentation Bug

Have you reproduced the bug with TensorFlow Nightly?

No

Source

binary

TensorFlow version

2.16.1

Custom code

Yes

OS platform and distribution

No response

Mobile device

No response

Python version

No response

Bazel version

No response

GCC/compiler version

No response

CUDA/cuDNN version

No response

GPU model and memory

No response

Current behavior?

In the documentation of tf.keras.Model as available at https://www.tensorflow.org/api_docs/python/tf/keras/Model, the method Model.add_loss has been used in the example code for the method compute_loss. However, the method Model.add_loss itself has not been documented on this page.

The keras documentation provides some documentation for Layer.add_loss, but I couldn't find any documentation even there for Model.add_loss.

Standalone code to reproduce the issue

This is a missing documentation issue, so there is no code.

Relevant log output

No response

@sushreebarsa
Copy link
Contributor

@piyushsrv The Model page doesn't explicitly mention add_loss, you can still use it on a Model object because it inherits from Layer. Model inherits from Layer in Keras. This means it gets all the methods and properties of the Layer by default. You can refer to the Layer.add_loss documentation for details on how it works: https://www.tensorflow.org/api_docs/python/tf/keras/losses.
Thank you!

@sushreebarsa sushreebarsa added the stat:awaiting response Status - Awaiting response from author label Apr 10, 2024
Copy link

This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale This label marks the issue/pr stale - to be closed automatically if no activity label Apr 18, 2024
Copy link

This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further.

Copy link

Are you satisfied with the resolution of your issue?
Yes
No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale This label marks the issue/pr stale - to be closed automatically if no activity stat:awaiting response Status - Awaiting response from author type:bug Bug type:docs-bug Document issues
Projects
None yet
Development

No branches or pull requests

2 participants