Artificial Intelligence Image Classification Machine Learning Tensorflow TFLite Build an Android app for custom object image classification using TensorFlow & Keras March 5, 2021February 6, 20231 min read techzizou007 To view this content, you must be a member of tech's Patreon at $30 or more Unlock with PatreonAlready a qualifying Patreon member? Refresh to access this content.
4 thoughts on “Build an Android app for custom object image classification using TensorFlow & Keras”
Can you make a video for this tutorial?i new with machine learning and i want to make an application for classification using mobilenetv2
I run your google colab and got error in step 9
yes, I will make a video tutorial on this too. currently working on videos for object detection. Watch out for the videos in the next 2 weeks.
/usr/local/lib/python3.7/dist-packages/tensorflow/python/keras/engine/training.py:1940: UserWarning: `Model.fit_generator` is deprecated and will be removed in a future version. Please use `Model.fit`, which supports generators.
warnings.warn(‘`Model.fit_generator` is deprecated and ‘
InvalidArgumentError Traceback (most recent call last)
7 history = model.fit_generator(train_gen, validation_data=val_gen, epochs=11,
—-> 9 callbacks = [batch_stats_callback, tensorboard])
/usr/local/lib/python3.7/dist-packages/tensorflow/python/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
59 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
—> 60 inputs, attrs, num_outputs)
61 except core._NotOkStatusException as e:
62 if name is not None:
InvalidArgumentError: logits and labels must be broadcastable: logits_size=[32,2] labels_size=[32,7]
[[node categorical_crossentropy/softmax_cross_entropy_with_logits (defined at :9) ]] [Op:__inference_train_function_35584]
Function call stack:
I got this error from step 9, can you tell me why?
my tutorial is for 2 classes only. u r probably training for 7 classes. if that is the case change this in step 7 line 3.
layers.Dense(2, activation=’softmax’) —> layers.Dense(7, activation=’softmax’)
I have to make a few adjustments in this article. will also make a video for this soon.