Hello @ai_curious! Can you please guide us about that? How to create multiple virtual environments?
This also has been addressed previously. Here is one such:
There is an embedded link shared by @paulinpaloalto where another learner shared rather detailed steps as they worked through it: DLS 1 - My own project in PyCharm - #4 by user424
As @rmwkwok states, there is no guarantee any of this works precisely as in the course environment, but it isnāt impossible and the road has been traveled by others and documented in these fora. No reason to struggle reinventing wheels.
@rmwkwok, your approach seems to work. thank you!
i see the following warning messages though:
WARNING:tensorflow:SavedModel saved prior to TF 2.5 detected when loading Keras model. Please ensure that you are saving the model with model.save() or tf.keras.models.save_model(), NOT tf.saved_model.save(). To confirm, there should be a file named ākeras_metadata.pbā in the SavedModel directory.
WARNING:tensorflow:No training configuration found in save file, so the model was not compiled. Compile it manually.
The message seems pretty clear, donāt you think? This assignment involves using a pre-trained model. So it imports the saved coefficients from that model and uses them to run the model in āpredictā mode. But that model was evidently trained on an earlier version of TF and now youāre trying to run it locally using TF 2.9.1 or the like. Apparently things have changed between 2.3 (or whatever) and 2.9 (or whatever) in a way that makes that not work. Youāll have to figure out where to get a version of the FaceNet model that you can use that was created and stored in a way that is compatible with your version of TF. Or maybe thereās a way to load the saved model and then store it in some more āgenericā form that is compatible with your version of TF. Or maybe thereās a different TF API that will accept the old form. And on and on ad infinitum ā¦
Or you can use the ācondaā strategy to duplicate the versions. That really sounds like the better way to go than trying to fix every āversionitisā landmine that you step on, which is the point ai_curious made earlier on this thread. How do you want to spend your time and energy: implementing one solution that will solve all these problems once and for all, or doing battle individually with each problem as you step on the landmine. Your choice ā¦
Yes, sir, it is crystal clear. I posted that message since I had posted a message stating the approach suggested by @rmwkwok seems to work. I just want to give the complete picture. Hope that is ok.
My interpretation is that you did not fully implement the strategy that Raymond suggested. You are using the current version of TF and not the same one used on the course website. That is the source of the problem.
I have implemented what is suggested in Running Course 4 Week 4 Face Recognition Programming Assignment notebook offline - #19 by rmwkwok
Hello @David00,
Thatās just a warning, but whether the loaded model has any issue will need to be checked.
Cheers,
Raymond
I understand those are warnings. I am posting my observations so if anyone else ever looks at these posts they get the complete picture. you took time to explain a potential solution to me. I believe it is my responsibility to give complete details so this thread is brought to a closure. I am more than happy to delete the posts since they seem to bother some.
Thank you for sharing it with us @David00.
Perhaps it would also be helpful to share if the loaded model itself has any difference from the one loaded on coursera. For example, if you have a few input samples, then whether or not the outputs from the model on Coursera are identical to the ones in your local environment. Ofcourse you donāt have to do this.
Cheers,
Raymond
I will definitely post. I havenāt had the time to work on it. Thank you for asking me to post.