-
Notifications
You must be signed in to change notification settings - Fork 159
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
Downloading the Model to my drive FAILED #4
Comments
It looks like you used the train your own models notebook, and now you're trying to save the model you trained? Or is it something else? |
yes sir i want to download model.h5 , can you help me please. |
What are you trying to download? The model weights trained by yourself or the weights that we provide? |
Model weight i trained i guess. (i meant running the CELLS by my self) please it would be a great help @JayYip |
May I know which notebook are you trying to run? |
Seems I cannot open the link you provide. That might be a copy of the original colab notebook and I cannot access it. Which notebook in this folder? |
DocProductPresentationV6-0.2.0.ipynb |
Sorry, but I can't find the corresponding code in the notebook. BTW, can you download the model files from OneDrive? Seems it's broken again. |
Sure sir but how can i download model.h5 of your model from OneDrive, can you please direct me. |
I'm not sure what is |
ok but how to download the model weight can you please help me step by step |
The zip file that I linked above contains the model weights. That is the same file as First, you download the zip file. Then you need to upload the file you downloaded to colab and rename it to I am still confused though, what is the |
Hello sir, actually I had an issue with the model. I've downloaded the weights and embedding file from your drive and when i tried to run it on my machine(windows os) i got an error in predictor.py file as it imports faiss which isn't available on windows yet. So, I was thinking is there a way to run the model on windows? Also I'm trying to deploy the model on an android based application and the video Siraj posted on his channel doesn't actually covers it neither his repository. Mind shedding in some light? |
same issue as @harshit-saraswat |
Please take a look at this issue. Seems they're working on a Windows version.
I don't have many experience of developing apps but as far as I can tell, retrieval based model is not very suitable to put the whole model to mobile device because the embedding vector size is huge. I would suggest you to serve the model on a server. BTW, if you guys have experience developing apps, maybe you can work with us! If you're interested please contact me via email: [email protected] and let us get to know you and your skillset. |
@JayYip there's the problem right, for the model to be used as a server I do need it to be run on my machine as for as far as I know, colab doesn't allow webhooks or post requests from other consoles/webservices such as dialogflow. TBH integrating it with Dialogflow as a chatbot would really be a great deal. I'm really trying on howto send my inputted query string to your model online as an server and get the ouput as result. Any ideas about how can I use this functionality? It needn't be necessary to be used as a dialogflow integration/ backend. I just need some guidance about using the model as a server and sending request and retrieving the output back, since as of now colab doesn't serve that type of services/purposes. Thanks! |
on that topic i want to convert it into .tflite can you help me with that @harshit-saraswat |
@pumpkinband Follow the following steps:
Hope it helped. |
thanks alot @harshit-saraswat and sir @JayYip thank you so much |
@jay 'model.h5' is the name of the file, what that person is doing trying to use the keras function So the issue is that either Keras is not saving the model correctly, or that Pydrive is not uploading it correctly. @pumpkinband did you get your issue fixed? |
Anyone able to run the model?or deploy it on android yet? |
Yeah. I know. I'm just confused what's the value of that file since I cannot find that chunk of code in the notebook. And he did not provide any info about
You should be able to run the model like we did in the notebooks once you downloaded the zip file and get the environment right. |
@pumpkinband can you send a link to your code? |
can you tell me where did i go wrong @harshit-saraswat |
@pumpkinband allow access for the link please. maybe change the folders sharing to allow everyone to view. |
@pumpkinband Your code doesn't make much sense to me. What do you want to download to your drive exactly? The |
@pumpkinband you don't need to convert the model to a json or h5 format because the model weight and graph are stored in the BioBert folder and also the new folder as .ckpt/.chkp and .meta file along with some .json file. Now use those files and convert them into a .pb and .pbtxt format and then convert it into a .tflite format. `import tensorflow as tf converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) |
I am trying to convert it into .pb but I just need one thing, what is output_node_names of this project ?? @harshit-saraswat |
I need to brush up machine learning model storage types. What is the difference between how it's currently stored and .pb? Also, what are 'output_node_names '. I'm not familiar with these, but if you can give more details I may be able to figure out what parts of DocProduct these belong in. |
3 different ways to find output_node_names, but I can’t do any of this : 1, If you still have your python file describing the model, you can always add an my_var = tf.indentity(my_var, name="my_new_name") and then load your previous model and save it again with this new added node 2, Also note that the graph_def is holding nodes in order (per connected graph), so output nodes should be close to the end of the array. 3, Finally, you can always use tensorboard to load an existing graph and just look at the name of your “output” nodes. |
can anyone please upload graph.pbtxt to tensorboard and tell me the "output_node_names" ?? |
What are 'output_node_names '? I'm not sure what this is. Is it the name of the output variables in the Tensorflow graph? "3 different ways to find output_node_names, but I can’t do any of this :" What issues have you run into doing these? |
Please take a look at this issue. #6 |
try the api: https://pocket-derm.firebaseapp.com/ |
`!pip install -U -q PyDrive
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials
auth.authenticate_user()
gauth = GoogleAuth()
gauth.credentials = GoogleCredentials.get_application_default()
drive = GoogleDrive(gauth)
model.save('model.h5')
model_file = drive.CreateFile({'title' : 'model.h5'})
model_file.SetContentFile('model.h5')
model_file.Upload()
drive.CreateFile({'id': model_file.get('id')})`
Used this code to Download the model but Failed
ERROR :-
NameError: name 'model' is not defined
The text was updated successfully, but these errors were encountered: