Skip to content

alfikiafan/euy-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Recipe Model

Ingredients:

  • unique_recipe_titles: List of unique recipe titles
  • unique_user_ids: List of unique user IDs
  • embedding_dimension: Dimensionality of the embedding space

Model Architecture:

Recipe Model:

  • Input: Recipe titles
    • StringLookup layer with no mask token
    • Embedding layer with output dimension embedding_dimension
  • Embedding layer is adapted to unique recipe titles

User Model:

  • Input: User IDs
    • StringLookup layer with no mask token
    • Embedding layer with output dimension embedding_dimension
  • Embedding layer is adapted to unique user IDs

Task:

  • Retrieval task using tfrs.tasks.Retrieval
  • Metrics: tfrs.metrics.FactorizedTopK
    • Candidates are generated by mapping a batch of recipes through the recipe model

Loss Computation:

  • Features:

    • user_id: User ID tensor
    • recipe_title: Recipe title tensor
  • Forward Pass:

    • User embeddings obtained by passing user_id through the user model
    • Positive recipe embeddings obtained by passing recipe_title through the recipe model
  • Loss Computation:

    • Task computes the loss and metrics using user embeddings and positive recipe embeddings

Call Method:

  • Input: Features dictionary with keys "user_id" and "recipe_title"
  • Output: Tuple of user embeddings and recipe embeddings obtained by passing inputs through respective models

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published