6.2: Converting Python saved models with the TensorFlow.js command line converter

6.2: Converting Python saved models with the TensorFlow.js command line converter

Google for Developers

1 год назад

5,746 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Loki Darkbeard
Loki Darkbeard - 02.09.2023 00:37

When entering the command: "!pip3 install tensorflowjs" I got the following error: "ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pydantic 2.2.1 requires typing-extensions>=4.6.1, but you have typing-extensions 4.5.0 which is incompatible.
pydantic-core 2.6.1 requires typing-extensions!=4.7.0,>=4.6.0, but you have typing-extensions 4.5.0 which is incompatible.
statsmodels 0.14.0 requires packaging>=21.3, but you have packaging 20.9 which is incompatible.
xarray 2023.7.0 requires packaging>=21.3, but you have packaging 20.9 which is incompatible.
Successfully installed flax-0.6.2 keras-2.13.1 packaging-20.9 tensorboard-2.13.0 tensorflow-2.13.0 tensorflow-decision-forests-1.5.0 tensorflow-estimator-2.13.0 tensorflowjs-4.10.0 typing-extensions-4.5.0 wurlitzer-3.0.3
WARNING: The following packages were previously imported in this runtime:
[keras,packaging,tensorboard,tensorflow]
You must restart the runtime in order to use newly installed versions."
I had to manually install the correct versions of the packages to get it to work (just like I had to do for my WSL2 install).

Ответить
Rob Olsen
Rob Olsen - 05.06.2023 16:36

Although I've been enjoying this series, it is disheartening that this particular video that was made by Google developers and uses Google Colab no longer works after only 3 months. When following the instructions on Colab, the code returns a "TF-TRT Warning: Could not find TensorRT" error when attempting to run the tensorflowjs_converter. I can't find any resolutions to this issue, and can't move forward if we're going to be building on these concepts in the next video.

Ответить
Mah Neh
Mah Neh - 03.05.2023 23:04

Great tutorial, I'd add that GraphModel is not fine-tunable, so you can not re-train it. The pb models that convert to GraphModels are then only useful for inference (to test the model).

I think it is said but just to make it obvious, if you want to fine tune / re-train / use transfer learning, you need Layer Models and for that you need "tf-models-here.h5" or the js versions.

Ответить