tensorflow / tensorflow/recommenders

Unable to save model checkpoint on Tensorflow Recommender's subclass model

Open
#669 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
2k
Forks
300
PR merge metrics
No merged PRs in 30d

Description

Hi,
I have used Tensorflow Recommender's tutorial of Movielens to train the recommender model. But when I try to use callback mdel checkpoint in model.fit(). It raises following error:

the input shape is not available or because the forward pass of the model is not defined.To define a forward pass, please override `Model.call()`. To specify an input shape, either call `build(input_shape)` directly, or call the model on actual data using `Model()`, `Model.fit()`, or `Model.predict()`. If you have a custom training step, please make sure to invoke the forward pass in train step through `Model.__call__`, i.e. `model(inputs)`, as opposed to `model.call()`.
Screenshot 2023-05-27 at 6 23 19 PM Also, I am unable to model.summary() Please help me to resolve the issue. What are the changes I need to do in the subclass models to save best model checkpoint?

Here is the tutorial link that I am using for training: https://www.tensorflow.org/recommenders/examples/deep_recommenders

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the TensorFlow Recommenders deep recommenders tutorial linked in the issue and reproduce the failure using model.fit(), ModelCheckpoint, and model.summary() on the subclass model. Investigate the reported input-shape and forward-pass error; done means identifying the required model setup and confirming that summary generation and best-checkpoint saving work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.