I can't download tflite-model-maker or get tflite model

120 views Asked by At

I need a neural network to classify text into sentimentality, but I need it in the .tflite format, since this is the format that Android Studio and android in general accepts. I'm new to neural networks and python, but as I understand it after reading the tensorflow and google guides, you can solve this problem in two ways: either make a model and then convert it, or initially make it using tflite-model-maker

I tried saving my neural networks and converting them to .tflite, but I could only convert one model normally (I did several for the test) and android studio says that this is not a tflite model, although the extension is like this.

When I tried to download the tflite-model-maker module via google colab, there was an endless download and, as I understood, this is because this module requires python 3.9. After that, I downloaded VS Code and python 3.9 and tried to download there, but I had a lot of problems, about the conflict between numpy, pandas, protobuff, tensorflow_datasets and the like, as well as the lack of array_record and "resource", and even after fixing some More and more problems are popping up.

I tried it through jupyter notebook, but I couldn't find tflite-model-maker there

import tensorflow as tf
import numpy as np
import os

from tflite_model_maker import configs
from tflite_model_maker import ExportFormat
from tflite_model_maker import model_spec
from tflite_model_maker import text_classifier
from tflite_model_maker.text_classifier import DataLoader

assert tf.__version__.startswith('2')
tf.get_logger().setLevel('ERROR')

These are the dependencies that I need, and which are not described in the tensorflow documentation https://www.tensorflow.org/lite/models/modify/model_maker/text_classification A link to google colab is given, but as I said, I have endless loading

0

There are 0 answers