Skip to content
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

NameError: name 'ImageClassifierDataLoader' is not defined #3

Open
baqwas opened this issue Sep 20, 2022 · 0 comments
Open

NameError: name 'ImageClassifierDataLoader' is not defined #3

baqwas opened this issue Sep 20, 2022 · 0 comments

Comments

@baqwas
Copy link

baqwas commented Sep 20, 2022

In Chapter9_ModelMaker.ipynb, I encounter the following error messages (pardon the long list):

# neccessary packages
import numpy as np
import tensorflow as tf
assert tf.__version__.startswith('2')
from tflite_model_maker import configs
from tflite_model_maker import ExportFormat
from tflite_model_maker import image_classifier
from tflite_model_maker import ImageClassifierDataLoader
from tflite_model_maker import model_spec

ModuleNotFoundError: No module named 'tensorflowjs'

... your existing code runs fine here, omitted for brevity

# review directory listing
os.listdir(image_path)
['tulips', 'daisy', 'roses', 'LICENSE.txt', 'dandelion', 'sunflowers']

# prepare dataset
data = ImageClassifierDataLoader.from_folder(image_path)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Input In [20], in <cell line: 2>()
      1 # prepare dataset
----> 2 data = ImageClassifierDataLoader.from_folder(image_path)

NameError: name 'ImageClassifierDataLoader' is not defined

Since I do not have a need for tensorflowjs in Chapter 9, what is the workaround to suppress this message? Thanks.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant