#๐ import errors
26 messages ยท Page 1 of 1 (latest)
@unborn field
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
there's no python submodule of tensorflow, you just want tensorflow.keras.applications: https://www.tensorflow.org/api_docs/python/tf/keras/applications
I tried that, and it didn't work
But the .python submodule worked for other keras imports on vscode
I am only having issues with MobileNetV2 and preprocess_input
i am scared to ask how you set up your environment, but keras should be installed as its own module so you could also try from keras import applications
okay, I did that and I gave no errors
But can I use MobileNetV2 and preprocess_input with just that?
no, just saying internally that tensorflow exposes keras as a submodule of itself
this pic is from tensorflow's init.py
it doesn't mess with keras at all, so tf.keras and keras are exactly the same
ohh okay
it's just trying to figure out if it needs to expose keras v2 or v3
so if i import applications with from keras import applications...then i can call MobileNetV2 and preprocess_input
yep! though it should be applications.mobilenet_v2 - https://www.tensorflow.org/api_docs/python/tf/keras/applications/mobilenet_v2
oh it's applications.mobilenet_v2.MobileNetV2
ok you're right, it's also under here: https://www.tensorflow.org/api_docs/python/tf/keras/applications/MobileNetV2
Instantiates the MobileNetV2 architecture.
i haven't touched this part of the docs before, it's very confusing
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.