question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simple Loading of the You Tube Recommendation Model

See original GitHub issue

I have read through the readme which contains a load using flask. I am currently saving the model as such https://github.com/massquantity/LibRecommender/issues/10#issuecomment-707470504

>>> from libreco.utils import save_info, save_model_tf_serving
>>> ytb_ranking = YouTubeRanking(...)
>>> ytb_ranking.fit(...)  # train model
>>> path = "tf_model"  # specify model saving directory
>>> save_model_tf_serving(path, ytb_ranking, "youtube")  # save tf model

and would like to know if there is a simple way to this model without deploying with the flask?

At the moment, Im using the following code:

frozen_graph_filename='C:\\Projects\\RecommendationModel\\data\\rec_data_mainfeat_alldeepFM_0\\1\\saved_model.pb'

with tf.gfile.GFile(frozen_graph_filename, "rb") as f:
    graph_def = tf.GraphDef()
    graph_def.ParseFromString(f.read())

graph = tf.get_default_graph()
tf.import_graph_def(graph_def, name="prefix")

However, it results in the following error:

    graph_def.ParseFromString(f.read())

DecodeError: Error parsing message

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
massquantitycommented, Jan 19, 2021

No, it doesn’t. I’ve come up with some ideas about it, and maybe they can be implemented in the next version.

1reaction
massquantitycommented, Jan 8, 2021

I have seen a lot of ways about saving and loading TensorFlow models on the internet. Honestly I’m also confused right now because some are about tf1 and some are about tf2. I haven’t tested it yet, but you can try the tf.saved_model.loader API.

I decide to do some research and add some methods to solve this save/load problem. But it will take a few days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

YouTube Recommendation System - Machine Learning ...
Develop Youtube Video Recommendation System. ... We load the data, pass it through the model, calculate the loss and then backward propagate the...
Read more >
Deep Neural Networks for YouTube Recommendations
In this paper, we describe the system at a high level and fo- cus on the dramatic performance improvements brought by deep learning....
Read more >
How the YouTube Algorithm Works in 2023 - Hootsuite Blog
The YouTube algorithm is the recommendation system that decides which videos YouTube suggests to those 2 billion-plus human users (and untold ...
Read more >
Recommendation system for similar content creators on ...
So this was an attempt to create a simple recommendation model with the help of which we can recommend similar content creators from...
Read more >
On YouTube's recommendation system
These human evaluations then train our system to model their decisions, and we now scale their assessments to all videos across YouTube.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found