Skip to content

Instantly share code, notes, and snippets.

@NobuoTsukamoto
Last active October 23, 2021 11:58
Show Gist options
  • Save NobuoTsukamoto/832905aa765f6faa16f53d6dddf61bd2 to your computer and use it in GitHub Desktop.
Save NobuoTsukamoto/832905aa765f6faa16f53d6dddf61bd2 to your computer and use it in GitHub Desktop.
export_tfv1_lite_models.ipynb
Display the source blob
Display the rendered blob
Raw
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "export_tfv1_lite_models.ipynb",
"provenance": [],
"collapsed_sections": [],
"toc_visible": true,
"authorship_tag": "ABX9TyOQAEZ1kel29+3w+4RmbX3A",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/gist/NobuoTsukamoto/832905aa765f6faa16f53d6dddf61bd2/export_tfv1_lite_models.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "FifIndY2JqGY"
},
"source": [
"# Export **\"TensorFlow 1 Detection Models\"** to TF-Lite, Edge TPU Models\n",
"\n",
"This notebook converts the pre-trained model of [\"TensorFlow 1 Detection Model Zoo\"](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/tf1_detection_zoo.md) into TF-Lite or Edge TPU Model.<br>\n",
"It works with the following repository code.<br>\n",
"https://github.com/tensorflow/models.git\n",
"<br><br>\n",
"The following models are targeted.<br>\n",
"\n",
"|Model Name|Output model type|\n",
"|:---|:---|\n",
"|ssd_mobilenet_v2_coco|FP32, FP16, INT8, EdgeTPU|\n",
"|ssd_mobilenet_v3_large_coco|FP32, FP16|\n",
"|ssd_mobilenet_v3_small_coco|FP32, FP16|\n",
"|ssd_mobilenet_v2_mnasfpn_coco|FP32, FP16|\n",
"|ssdlite_mobiledet_cpu_coco|FP32|\n",
"|ssdlite_mobiledet_edgetpu_coco|INT8, EdgeTPU|\n",
"|ssd_mobiledet_dsp_coco|INT8, EdgeTPU|\n",
"|ssd_mobilenet_edgetpu_coco|INT8, EdgeTPU|\n",
"|ssd_mobilenet_v1_fpn_coco|FP32, FP16|\n",
"|ssd_resnet_50_fpn_coco|FP32, FP16|\n",
"\n",
"Copy the model to google drive.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "GRT8DYnKYS85"
},
"source": [
"# Setup\n",
"- TensorFlow Object detection API (TF1.x)\n",
"- EdgeTPU Compiler "
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZOR3cGQndmRI",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "4a3eaddd-2c62-42c0-9448-3759b7c5ce8c"
},
"source": [
"from google.colab import drive\n",
"drive.mount('/content/drive')"
],
"execution_count": 1,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Mounted at /content/drive\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "9CToY_VmncWq"
},
"source": [
"## Using TensorFlow 1.x"
]
},
{
"cell_type": "code",
"metadata": {
"id": "y7erbNmjnWLF",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "038ac2b7-1620-4f3d-b5d3-185f8a105dfe"
},
"source": [
"%tensorflow_version 1.x"
],
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"TensorFlow 1.x selected.\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "9rv_47YDnlka"
},
"source": [
"## Setup TensorFlow Object detection API"
]
},
{
"cell_type": "code",
"metadata": {
"id": "j8wSH6LEnkWh",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "497beb71-bcdd-45d0-ff81-736ebbd3581f"
},
"source": [
"!git clone https://github.com/tensorflow/models.git\n",
"%cd models\n",
"!git checkout 7907ba50057bef8abd423b6db86edd5aa6de547a"
],
"execution_count": 3,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Cloning into 'models'...\n",
"remote: Enumerating objects: 65305, done.\u001b[K\n",
"remote: Total 65305 (delta 0), reused 0 (delta 0), pack-reused 65305\u001b[K\n",
"Receiving objects: 100% (65305/65305), 575.49 MiB | 16.79 MiB/s, done.\n",
"Resolving deltas: 100% (45700/45700), done.\n",
"/content/models\n",
"Note: checking out '7907ba50057bef8abd423b6db86edd5aa6de547a'.\n",
"\n",
"You are in 'detached HEAD' state. You can look around, make experimental\n",
"changes and commit them, and you can discard any commits you make in this\n",
"state without impacting any branches by performing another checkout.\n",
"\n",
"If you want to create a new branch to retain commits you create, you may\n",
"do so (now or later) by using -b with the checkout command again. Example:\n",
"\n",
" git checkout -b <new-branch-name>\n",
"\n",
"HEAD is now at 7907ba50 Internal change\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "AJU35X1coeWG",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "98295972-5abf-4e65-ddcd-f365fa57f612"
},
"source": [
"%%bash\n",
"\n",
"cd /content/models/research\n",
"# Compile protos.\n",
"protoc object_detection/protos/*.proto --python_out=.\n",
"\n",
"# Install TensorFlow Object Detection API.\n",
"cp object_detection/packages/tf1/setup.py .\n",
"python -m pip install ."
],
"execution_count": 4,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Processing /content/models/research\n",
"Requirement already satisfied: pillow in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (7.1.2)\n",
"Requirement already satisfied: lxml in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (4.2.6)\n",
"Requirement already satisfied: matplotlib in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (3.2.2)\n",
"Requirement already satisfied: Cython in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (0.29.24)\n",
"Requirement already satisfied: contextlib2 in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (0.5.5)\n",
"Collecting tf-slim\n",
" Downloading tf_slim-1.1.0-py2.py3-none-any.whl (352 kB)\n",
"Requirement already satisfied: six in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (1.15.0)\n",
"Requirement already satisfied: pycocotools in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (2.0.2)\n",
"Collecting lvis\n",
" Downloading lvis-0.5.3-py3-none-any.whl (14 kB)\n",
"Requirement already satisfied: scipy in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (1.4.1)\n",
"Requirement already satisfied: pandas in /usr/local/lib/python3.7/dist-packages (from object-detection==0.1) (1.1.5)\n",
"Requirement already satisfied: kiwisolver>=1.1.0 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (1.3.2)\n",
"Requirement already satisfied: opencv-python>=4.1.0.25 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (4.1.2.30)\n",
"Requirement already satisfied: python-dateutil>=2.8.0 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (2.8.2)\n",
"Requirement already satisfied: pyparsing>=2.4.0 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (2.4.7)\n",
"Requirement already satisfied: cycler>=0.10.0 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (0.10.0)\n",
"Requirement already satisfied: numpy>=1.18.2 in /usr/local/lib/python3.7/dist-packages (from lvis->object-detection==0.1) (1.19.5)\n",
"Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas->object-detection==0.1) (2018.9)\n",
"Requirement already satisfied: setuptools>=18.0 in /usr/local/lib/python3.7/dist-packages (from pycocotools->object-detection==0.1) (57.4.0)\n",
"Requirement already satisfied: absl-py>=0.2.2 in /usr/local/lib/python3.7/dist-packages (from tf-slim->object-detection==0.1) (0.12.0)\n",
"Building wheels for collected packages: object-detection\n",
" Building wheel for object-detection (setup.py): started\n",
" Building wheel for object-detection (setup.py): finished with status 'done'\n",
" Created wheel for object-detection: filename=object_detection-0.1-py3-none-any.whl size=1647870 sha256=97fb4b676aefe89463740edadae715ae252f4160e2b3e3b73f7a49ba31384f77\n",
" Stored in directory: /tmp/pip-ephem-wheel-cache-jmubyf5u/wheels/fa/a4/d2/e9a5057e414fd46c8e543d2706cd836d64e1fcd9eccceb2329\n",
"Successfully built object-detection\n",
"Installing collected packages: tf-slim, lvis, object-detection\n",
"Successfully installed lvis-0.5.3 object-detection-0.1 tf-slim-1.1.0\n"
]
},
{
"output_type": "stream",
"name": "stderr",
"text": [
" DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.\n",
" pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "mgTuKF-Ln6Xy",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "18d2f85f-63e2-482c-95fd-241993df41d8"
},
"source": [
"%cd /content/models/research\n",
"\n",
"import os\n",
"\n",
"os.environ['PYTHONPATH'] = '/content/models:' + os.environ['PYTHONPATH']\n",
"print(os.environ['PYTHONPATH'])"
],
"execution_count": 5,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"/content/models/research\n",
"/content/models:/tensorflow-1.15.2/python3.7:/env/python\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "y4izg5T6oMpA",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "0e95aa86-0c85-4b6b-d634-e079201aa52c"
},
"source": [
"# Test the installation.\n",
"!python object_detection/builders/model_builder_tf1_test.py"
],
"execution_count": 6,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Running tests under Python 3.7.12: /usr/bin/python3\n",
"[ RUN ] ModelBuilderTF1Test.test_create_context_rcnn_from_config_with_params0 (True)\n",
"[ OK ] ModelBuilderTF1Test.test_create_context_rcnn_from_config_with_params0 (True)\n",
"[ RUN ] ModelBuilderTF1Test.test_create_context_rcnn_from_config_with_params1 (False)\n",
"[ OK ] ModelBuilderTF1Test.test_create_context_rcnn_from_config_with_params1 (False)\n",
"[ RUN ] ModelBuilderTF1Test.test_create_experimental_model\n",
"[ OK ] ModelBuilderTF1Test.test_create_experimental_model\n",
"[ RUN ] ModelBuilderTF1Test.test_create_faster_rcnn_from_config_with_crop_feature0 (True)\n",
"[ OK ] ModelBuilderTF1Test.test_create_faster_rcnn_from_config_with_crop_feature0 (True)\n",
"[ RUN ] ModelBuilderTF1Test.test_create_faster_rcnn_from_config_with_crop_feature1 (False)\n",
"[ OK ] ModelBuilderTF1Test.test_create_faster_rcnn_from_config_with_crop_feature1 (False)\n",
"[ RUN ] ModelBuilderTF1Test.test_create_faster_rcnn_model_from_config_with_example_miner\n",
"[ OK ] ModelBuilderTF1Test.test_create_faster_rcnn_model_from_config_with_example_miner\n",
"[ RUN ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul\n",
"[ OK ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_faster_rcnn_with_matmul\n",
"[ RUN ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul\n",
"[ OK ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_faster_rcnn_without_matmul\n",
"[ RUN ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul\n",
"[ OK ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_mask_rcnn_with_matmul\n",
"[ RUN ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul\n",
"[ OK ] ModelBuilderTF1Test.test_create_faster_rcnn_models_from_config_mask_rcnn_without_matmul\n",
"[ RUN ] ModelBuilderTF1Test.test_create_rfcn_model_from_config\n",
"[ OK ] ModelBuilderTF1Test.test_create_rfcn_model_from_config\n",
"[ RUN ] ModelBuilderTF1Test.test_create_ssd_fpn_model_from_config\n",
"[ OK ] ModelBuilderTF1Test.test_create_ssd_fpn_model_from_config\n",
"[ RUN ] ModelBuilderTF1Test.test_create_ssd_models_from_config\n",
"[ OK ] ModelBuilderTF1Test.test_create_ssd_models_from_config\n",
"[ RUN ] ModelBuilderTF1Test.test_invalid_faster_rcnn_batchnorm_update\n",
"[ OK ] ModelBuilderTF1Test.test_invalid_faster_rcnn_batchnorm_update\n",
"[ RUN ] ModelBuilderTF1Test.test_invalid_first_stage_nms_iou_threshold\n",
"[ OK ] ModelBuilderTF1Test.test_invalid_first_stage_nms_iou_threshold\n",
"[ RUN ] ModelBuilderTF1Test.test_invalid_model_config_proto\n",
"[ OK ] ModelBuilderTF1Test.test_invalid_model_config_proto\n",
"[ RUN ] ModelBuilderTF1Test.test_invalid_second_stage_batch_size\n",
"[ OK ] ModelBuilderTF1Test.test_invalid_second_stage_batch_size\n",
"[ RUN ] ModelBuilderTF1Test.test_session\n",
"[ SKIPPED ] ModelBuilderTF1Test.test_session\n",
"[ RUN ] ModelBuilderTF1Test.test_unknown_faster_rcnn_feature_extractor\n",
"[ OK ] ModelBuilderTF1Test.test_unknown_faster_rcnn_feature_extractor\n",
"[ RUN ] ModelBuilderTF1Test.test_unknown_meta_architecture\n",
"[ OK ] ModelBuilderTF1Test.test_unknown_meta_architecture\n",
"[ RUN ] ModelBuilderTF1Test.test_unknown_ssd_feature_extractor\n",
"[ OK ] ModelBuilderTF1Test.test_unknown_ssd_feature_extractor\n",
"----------------------------------------------------------------------\n",
"Ran 21 tests in 0.219s\n",
"\n",
"OK (skipped=1)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "c-fL1Ei3sQCx"
},
"source": [
"## Install EdgeTPU Compiler"
]
},
{
"cell_type": "code",
"metadata": {
"id": "SfGFiecZsTjX",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "69967698-75a6-4cfa-9cb3-ec6117804ba3"
},
"source": [
"!echo \"deb https://packages.cloud.google.com/apt coral-edgetpu-stable main\" | tee /etc/apt/sources.list.d/coral-edgetpu.list\n",
"!curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -\n",
"!sudo apt -qq update\n",
"!apt-get -qq install edgetpu-compiler"
],
"execution_count": 7,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"deb https://packages.cloud.google.com/apt coral-edgetpu-stable main\n",
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
" Dload Upload Total Spent Left Speed\n",
"100 2537 100 2537 0 0 93962 0 --:--:-- --:--:-- --:--:-- 93962\n",
"OK\n",
"68 packages can be upgraded. Run 'apt list --upgradable' to see them.\n",
"Selecting previously unselected package edgetpu-compiler.\n",
"(Reading database ... 155047 files and directories currently installed.)\n",
"Preparing to unpack .../edgetpu-compiler_16.0_amd64.deb ...\n",
"Unpacking edgetpu-compiler (16.0) ...\n",
"Setting up edgetpu-compiler (16.0) ...\n",
"Processing triggers for libc-bin (2.27-3ubuntu1.3) ...\n",
"/sbin/ldconfig.real: /usr/local/lib/python3.7/dist-packages/ideep4py/lib/libmkldnn.so.0 is not a symbolic link\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "26ba2wNassGI",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "2874a3aa-2006-4d25-95d1-683eb308b6e9"
},
"source": [
"!edgetpu_compiler -v"
],
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Edge TPU Compiler version 16.0.384591198\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "i2YPFpUKpAFT"
},
"source": [
"# Download pre-trained model and convert edge tpu model.\n"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "M2JrDoHqYjnn"
},
"source": [
"make output directory."
]
},
{
"cell_type": "code",
"metadata": {
"id": "QwBmIsqkr7TR"
},
"source": [
"!mkdir /content/tflite_models"
],
"execution_count": 9,
"outputs": []
},
{
"cell_type": "markdown",
"metadata": {
"id": "2rUQTqyWynOC"
},
"source": [
"## ssd_mobilenet_v2_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "uYKvW3ODyllq",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "137fe883-42b5-428e-8fdb-9a8410d5c056"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz -P /content/\n",
"!tar xf /content/ssd_mobilenet_v2_coco_2018_03_29.tar.gz -C /content/"
],
"execution_count": 10,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:11:20-- http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_coco_2018_03_29.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 187925923 (179M) [application/x-tar]\n",
"Saving to: ‘/content/ssd_mobilenet_v2_coco_2018_03_29.tar.gz’\n",
"\n",
"ssd_mobilenet_v2_co 100%[===================>] 179.22M 180MB/s in 1.0s \n",
"\n",
"2021-10-23 11:11:21 (180 MB/s) - ‘/content/ssd_mobilenet_v2_coco_2018_03_29.tar.gz’ saved [187925923/187925923]\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "fdo6mfTmVVHO"
},
"source": [
"- https://github.com/tensorflow/models/issues/4066\n",
"- https://stackoverflow.com/questions/49880939/tf-object-detection-api-detection-model-retraining-object-detection-protos-ssd/49883742#49883742"
]
},
{
"cell_type": "code",
"metadata": {
"id": "_slWrID5U92I"
},
"source": [
"%%bash\n",
"\n",
"cat <<EOF > /content/ssd_mobilenet_v2_coco_2018_03_29/config.patch\n",
"--- pipeline.config.org\t2021-05-16 22:17:06.136052811 +0900\n",
"+++ pipeline.config\t2021-05-16 22:17:14.757985655 +0900\n",
"@@ -32,7 +32,6 @@\n",
" train: true\n",
" }\n",
" }\n",
"- batch_norm_trainable: true\n",
" use_depthwise: true\n",
" }\n",
" box_coder {\n",
"EOF"
],
"execution_count": 11,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "28Alv3DsVL35",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "20f8c551-905f-46bf-d947-567629fc2943"
},
"source": [
"!patch -u /content/ssd_mobilenet_v2_coco_2018_03_29/pipeline.config < /content/ssd_mobilenet_v2_coco_2018_03_29/config.patch"
],
"execution_count": 12,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"patching file /content/ssd_mobilenet_v2_coco_2018_03_29/pipeline.config\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "qxUshZmTABrD",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "42d8a229-f59b-4e7f-87b1-e5c8b5c815dc"
},
"source": [
"!python3 object_detection/export_inference_graph.py \\\n",
" --input_type=image_tensor \\\n",
" --pipeline_config_path=\"/content/ssd_mobilenet_v2_coco_2018_03_29/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssd_mobilenet_v2_coco_2018_03_29/model.ckpt\" \\\n",
" --output_directory=\"/content/ssd_mobilenet_v2_coco_2018_03_29_new\""
],
"execution_count": 13,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:11:27.441350 140575728891776 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:29.472011 140575728891776 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:29.507012 140575728891776 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:29.540317 140575728891776 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:29.573113 140575728891776 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:29.605981 140575728891776 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:29.639050 140575728891776 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/object_detection/core/post_processing.py:601: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use tf.where in 2.0, which has the same broadcast rule as np.where\n",
"W1023 11:11:29.878631 140575728891776 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/object_detection/core/post_processing.py:601: where (from tensorflow.python.ops.array_ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use tf.where in 2.0, which has the same broadcast rule as np.where\n",
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/object_detection/exporter.py:474: get_or_create_global_step (from tf_slim.ops.variables) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please switch to tf.train.get_or_create_global_step\n",
"W1023 11:11:33.138721 140575728891776 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/object_detection/exporter.py:474: get_or_create_global_step (from tf_slim.ops.variables) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please switch to tf.train.get_or_create_global_step\n",
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/object_detection/exporter.py:653: print_model_analysis (from tensorflow.contrib.tfprof.model_analyzer) is deprecated and will be removed after 2018-01-01.\n",
"Instructions for updating:\n",
"Use `tf.profiler.profile(graph, run_meta, op_log, cmd, options)`. Build `options` with `tf.profiler.ProfileOptionBuilder`. See README.md for details\n",
"W1023 11:11:33.141587 140575728891776 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/object_detection/exporter.py:653: print_model_analysis (from tensorflow.contrib.tfprof.model_analyzer) is deprecated and will be removed after 2018-01-01.\n",
"Instructions for updating:\n",
"Use `tf.profiler.profile(graph, run_meta, op_log, cmd, options)`. Build `options` with `tf.profiler.ProfileOptionBuilder`. See README.md for details\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/profiler/internal/flops_registry.py:142: tensor_shape_from_node_def_name (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.tensor_shape_from_node_def_name`\n",
"W1023 11:11:33.142322 140575728891776 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/profiler/internal/flops_registry.py:142: tensor_shape_from_node_def_name (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.tensor_shape_from_node_def_name`\n",
"315 ops no flops stats due to incomplete shapes.\n",
"Parsing Inputs...\n",
"Incomplete shape.\n",
"\n",
"=========================Options=============================\n",
"-max_depth 10000\n",
"-min_bytes 0\n",
"-min_peak_bytes 0\n",
"-min_residual_bytes 0\n",
"-min_output_bytes 0\n",
"-min_micros 0\n",
"-min_accelerator_micros 0\n",
"-min_cpu_micros 0\n",
"-min_params 0\n",
"-min_float_ops 0\n",
"-min_occurrence 0\n",
"-step -1\n",
"-order_by name\n",
"-account_type_regexes _trainable_variables\n",
"-start_name_regexes .*\n",
"-trim_name_regexes .*BatchNorm.*\n",
"-show_name_regexes .*\n",
"-hide_name_regexes \n",
"-account_displayed_op_only true\n",
"-select params\n",
"-output stdout:\n",
"\n",
"==================Model Analysis Report======================\n",
"Incomplete shape.\n",
"\n",
"Doc:\n",
"scope: The nodes in the model graph are organized by their names, which is hierarchical like filesystem.\n",
"param: Number of parameters (in the Variable).\n",
"\n",
"Profile:\n",
"node name | # parameters\n",
"_TFProfRoot (--/16.80m params)\n",
" BoxPredictor_0 (--/1.48m params)\n",
" BoxPredictor_0/BoxEncodingPredictor (--/62.22k params)\n",
" BoxPredictor_0/BoxEncodingPredictor/biases (12, 12/12 params)\n",
" BoxPredictor_0/BoxEncodingPredictor/weights (3x3x576x12, 62.21k/62.21k params)\n",
" BoxPredictor_0/ClassPredictor (--/1.42m params)\n",
" BoxPredictor_0/ClassPredictor/biases (273, 273/273 params)\n",
" BoxPredictor_0/ClassPredictor/weights (3x3x576x273, 1.42m/1.42m params)\n",
" BoxPredictor_1 (--/6.57m params)\n",
" BoxPredictor_1/BoxEncodingPredictor (--/276.50k params)\n",
" BoxPredictor_1/BoxEncodingPredictor/biases (24, 24/24 params)\n",
" BoxPredictor_1/BoxEncodingPredictor/weights (3x3x1280x24, 276.48k/276.48k params)\n",
" BoxPredictor_1/ClassPredictor (--/6.29m params)\n",
" BoxPredictor_1/ClassPredictor/biases (546, 546/546 params)\n",
" BoxPredictor_1/ClassPredictor/weights (3x3x1280x546, 6.29m/6.29m params)\n",
" BoxPredictor_2 (--/2.63m params)\n",
" BoxPredictor_2/BoxEncodingPredictor (--/110.62k params)\n",
" BoxPredictor_2/BoxEncodingPredictor/biases (24, 24/24 params)\n",
" BoxPredictor_2/BoxEncodingPredictor/weights (3x3x512x24, 110.59k/110.59k params)\n",
" BoxPredictor_2/ClassPredictor (--/2.52m params)\n",
" BoxPredictor_2/ClassPredictor/biases (546, 546/546 params)\n",
" BoxPredictor_2/ClassPredictor/weights (3x3x512x546, 2.52m/2.52m params)\n",
" BoxPredictor_3 (--/1.31m params)\n",
" BoxPredictor_3/BoxEncodingPredictor (--/55.32k params)\n",
" BoxPredictor_3/BoxEncodingPredictor/biases (24, 24/24 params)\n",
" BoxPredictor_3/BoxEncodingPredictor/weights (3x3x256x24, 55.30k/55.30k params)\n",
" BoxPredictor_3/ClassPredictor (--/1.26m params)\n",
" BoxPredictor_3/ClassPredictor/biases (546, 546/546 params)\n",
" BoxPredictor_3/ClassPredictor/weights (3x3x256x546, 1.26m/1.26m params)\n",
" BoxPredictor_4 (--/1.31m params)\n",
" BoxPredictor_4/BoxEncodingPredictor (--/55.32k params)\n",
" BoxPredictor_4/BoxEncodingPredictor/biases (24, 24/24 params)\n",
" BoxPredictor_4/BoxEncodingPredictor/weights (3x3x256x24, 55.30k/55.30k params)\n",
" BoxPredictor_4/ClassPredictor (--/1.26m params)\n",
" BoxPredictor_4/ClassPredictor/biases (546, 546/546 params)\n",
" BoxPredictor_4/ClassPredictor/weights (3x3x256x546, 1.26m/1.26m params)\n",
" BoxPredictor_5 (--/657.21k params)\n",
" BoxPredictor_5/BoxEncodingPredictor (--/27.67k params)\n",
" BoxPredictor_5/BoxEncodingPredictor/biases (24, 24/24 params)\n",
" BoxPredictor_5/BoxEncodingPredictor/weights (3x3x128x24, 27.65k/27.65k params)\n",
" BoxPredictor_5/ClassPredictor (--/629.54k params)\n",
" BoxPredictor_5/ClassPredictor/biases (546, 546/546 params)\n",
" BoxPredictor_5/ClassPredictor/weights (3x3x128x546, 628.99k/628.99k params)\n",
" FeatureExtractor (--/2.84m params)\n",
" FeatureExtractor/MobilenetV2 (--/2.84m params)\n",
" FeatureExtractor/MobilenetV2/Conv (--/864 params)\n",
" FeatureExtractor/MobilenetV2/Conv/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/Conv/weights (3x3x3x32, 864/864 params)\n",
" FeatureExtractor/MobilenetV2/Conv_1 (--/409.60k params)\n",
" FeatureExtractor/MobilenetV2/Conv_1/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/Conv_1/weights (1x1x320x1280, 409.60k/409.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv (--/800 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv/depthwise (--/288 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv/depthwise/depthwise_weights (3x3x32x1, 288/288 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv/project (--/512 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv/project/weights (1x1x32x16, 512/512 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1 (--/4.70k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise (--/864 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise/depthwise_weights (3x3x96x1, 864/864 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/expand (--/1.54k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/expand/weights (1x1x16x96, 1.54k/1.54k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/project (--/2.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_1/project/weights (1x1x96x24, 2.30k/2.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10 (--/64.90k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise (--/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/expand (--/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/expand/weights (1x1x64x384, 24.58k/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/project (--/36.86k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_10/project/weights (1x1x384x96, 36.86k/36.86k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11 (--/115.78k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise (--/5.18k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise/depthwise_weights (3x3x576x1, 5.18k/5.18k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/expand (--/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/expand/weights (1x1x96x576, 55.30k/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/project (--/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_11/project/weights (1x1x576x96, 55.30k/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12 (--/115.78k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise (--/5.18k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise/depthwise_weights (3x3x576x1, 5.18k/5.18k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/expand (--/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/expand/weights (1x1x96x576, 55.30k/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/project (--/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_12/project/weights (1x1x576x96, 55.30k/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13 (--/152.64k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise (--/5.18k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise/depthwise_weights (3x3x576x1, 5.18k/5.18k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/expand (--/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/expand/weights (1x1x96x576, 55.30k/55.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/project (--/92.16k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_13/project/weights (1x1x576x160, 92.16k/92.16k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14 (--/315.84k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise (--/8.64k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise/depthwise_weights (3x3x960x1, 8.64k/8.64k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/expand (--/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/expand/weights (1x1x160x960, 153.60k/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/project (--/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_14/project/weights (1x1x960x160, 153.60k/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15 (--/315.84k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise (--/8.64k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise/depthwise_weights (3x3x960x1, 8.64k/8.64k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/expand (--/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/expand/weights (1x1x160x960, 153.60k/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/project (--/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_15/project/weights (1x1x960x160, 153.60k/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16 (--/469.44k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise (--/8.64k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise/depthwise_weights (3x3x960x1, 8.64k/8.64k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/expand (--/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/expand/weights (1x1x160x960, 153.60k/153.60k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/project (--/307.20k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_16/project/weights (1x1x960x320, 307.20k/307.20k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2 (--/8.21k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise (--/1.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise/depthwise_weights (3x3x144x1, 1.30k/1.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/expand (--/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/expand/weights (1x1x24x144, 3.46k/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/project (--/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_2/project/weights (1x1x144x24, 3.46k/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3 (--/9.36k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise (--/1.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise/depthwise_weights (3x3x144x1, 1.30k/1.30k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/expand (--/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/expand/weights (1x1x24x144, 3.46k/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/project (--/4.61k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_3/project/weights (1x1x144x32, 4.61k/4.61k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4 (--/14.02k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise (--/1.73k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise/depthwise_weights (3x3x192x1, 1.73k/1.73k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/expand (--/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/expand/weights (1x1x32x192, 6.14k/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/project (--/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_4/project/weights (1x1x192x32, 6.14k/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5 (--/14.02k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise (--/1.73k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise/depthwise_weights (3x3x192x1, 1.73k/1.73k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/expand (--/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/expand/weights (1x1x32x192, 6.14k/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/project (--/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_5/project/weights (1x1x192x32, 6.14k/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6 (--/20.16k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise (--/1.73k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise/depthwise_weights (3x3x192x1, 1.73k/1.73k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/expand (--/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/expand/weights (1x1x32x192, 6.14k/6.14k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/project (--/12.29k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_6/project/weights (1x1x192x64, 12.29k/12.29k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7 (--/52.61k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise (--/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/expand (--/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/expand/weights (1x1x64x384, 24.58k/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/project (--/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_7/project/weights (1x1x384x64, 24.58k/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8 (--/52.61k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise (--/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/expand (--/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/expand/weights (1x1x64x384, 24.58k/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/project (--/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_8/project/weights (1x1x384x64, 24.58k/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9 (--/52.61k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise (--/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise/depthwise_weights (3x3x384x1, 3.46k/3.46k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/expand (--/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/expand/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/expand/weights (1x1x64x384, 24.58k/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/project (--/24.58k params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/project/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/expanded_conv_9/project/weights (1x1x384x64, 24.58k/24.58k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_2_1x1_256 (--/327.68k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_2_1x1_256/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_2_1x1_256/weights (1x1x1280x256, 327.68k/327.68k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_3_1x1_128 (--/65.54k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_3_1x1_128/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_3_1x1_128/weights (1x1x512x128, 65.54k/65.54k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_4_1x1_128 (--/32.77k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_4_1x1_128/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_4_1x1_128/weights (1x1x256x128, 32.77k/32.77k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_5_1x1_64 (--/16.38k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_5_1x1_64/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_1_Conv2d_5_1x1_64/weights (1x1x256x64, 16.38k/16.38k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512 (--/131.07k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512/weights (1x1x256x512, 131.07k/131.07k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512_depthwise (--/2.30k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512_depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_2_3x3_s2_512_depthwise/depthwise_weights (3x3x256x1, 2.30k/2.30k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256 (--/32.77k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256/weights (1x1x128x256, 32.77k/32.77k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256_depthwise (--/1.15k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256_depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_3_3x3_s2_256_depthwise/depthwise_weights (3x3x128x1, 1.15k/1.15k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256 (--/32.77k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256/weights (1x1x128x256, 32.77k/32.77k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256_depthwise (--/1.15k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256_depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_4_3x3_s2_256_depthwise/depthwise_weights (3x3x128x1, 1.15k/1.15k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128 (--/8.19k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128/weights (1x1x64x128, 8.19k/8.19k params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128_depthwise (--/576 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128_depthwise/BatchNorm (--/0 params)\n",
" FeatureExtractor/MobilenetV2/layer_19_2_Conv2d_5_3x3_s2_128_depthwise/depthwise_weights (3x3x64x1, 576/576 params)\n",
"\n",
"======================End of Report==========================\n",
"315 ops no flops stats due to incomplete shapes.\n",
"Parsing Inputs...\n",
"Incomplete shape.\n",
"\n",
"=========================Options=============================\n",
"-max_depth 10000\n",
"-min_bytes 0\n",
"-min_peak_bytes 0\n",
"-min_residual_bytes 0\n",
"-min_output_bytes 0\n",
"-min_micros 0\n",
"-min_accelerator_micros 0\n",
"-min_cpu_micros 0\n",
"-min_params 0\n",
"-min_float_ops 1\n",
"-min_occurrence 0\n",
"-step -1\n",
"-order_by float_ops\n",
"-account_type_regexes .*\n",
"-start_name_regexes .*\n",
"-trim_name_regexes .*BatchNorm.*,.*Initializer.*,.*Regularizer.*,.*BiasAdd.*\n",
"-show_name_regexes .*\n",
"-hide_name_regexes \n",
"-account_displayed_op_only true\n",
"-select float_ops\n",
"-output stdout:\n",
"\n",
"==================Model Analysis Report======================\n",
"Incomplete shape.\n",
"\n",
"Doc:\n",
"scope: The nodes in the model graph are organized by their names, which is hierarchical like filesystem.\n",
"flops: Number of float operations. Note: Please read the implementation for the math behind it.\n",
"\n",
"Profile:\n",
"node name | # float_ops\n",
"_TFProfRoot (--/13.97k flops)\n",
" MultipleGridAnchorGenerator/mul_20 (2.17k/2.17k flops)\n",
" MultipleGridAnchorGenerator/sub (2.17k/2.17k flops)\n",
" MultipleGridAnchorGenerator/mul_19 (2.17k/2.17k flops)\n",
" MultipleGridAnchorGenerator/mul_27 (1.20k/1.20k flops)\n",
" MultipleGridAnchorGenerator/sub_1 (1.20k/1.20k flops)\n",
" MultipleGridAnchorGenerator/mul_28 (1.20k/1.20k flops)\n",
" MultipleGridAnchorGenerator/mul_21 (1.08k/1.08k flops)\n",
" MultipleGridAnchorGenerator/mul_29 (600/600 flops)\n",
" MultipleGridAnchorGenerator/sub_2 (300/300 flops)\n",
" MultipleGridAnchorGenerator/mul_35 (300/300 flops)\n",
" MultipleGridAnchorGenerator/mul_36 (300/300 flops)\n",
" MultipleGridAnchorGenerator/mul_37 (150/150 flops)\n",
" MultipleGridAnchorGenerator/sub_3 (108/108 flops)\n",
" MultipleGridAnchorGenerator/mul_44 (108/108 flops)\n",
" MultipleGridAnchorGenerator/mul_43 (108/108 flops)\n",
" MultipleGridAnchorGenerator/mul_45 (54/54 flops)\n",
" MultipleGridAnchorGenerator/sub_4 (48/48 flops)\n",
" MultipleGridAnchorGenerator/mul_51 (48/48 flops)\n",
" MultipleGridAnchorGenerator/mul_52 (48/48 flops)\n",
" MultipleGridAnchorGenerator/mul_53 (24/24 flops)\n",
" MultipleGridAnchorGenerator/mul_18 (19/19 flops)\n",
" MultipleGridAnchorGenerator/mul_17 (19/19 flops)\n",
" MultipleGridAnchorGenerator/mul_60 (12/12 flops)\n",
" MultipleGridAnchorGenerator/sub_5 (12/12 flops)\n",
" MultipleGridAnchorGenerator/mul_59 (12/12 flops)\n",
" MultipleGridAnchorGenerator/mul_25 (10/10 flops)\n",
" MultipleGridAnchorGenerator/mul_26 (10/10 flops)\n",
" MultipleGridAnchorGenerator/mul_40 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_30 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_61 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_46 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_47 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_48 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_56 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_55 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_54 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_39 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_38 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_32 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_31 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_24 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_23 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_22 (6/6 flops)\n",
" MultipleGridAnchorGenerator/truediv_19 (6/6 flops)\n",
" MultipleGridAnchorGenerator/truediv_18 (6/6 flops)\n",
" MultipleGridAnchorGenerator/truediv_17 (6/6 flops)\n",
" MultipleGridAnchorGenerator/truediv_15 (6/6 flops)\n",
" MultipleGridAnchorGenerator/truediv_16 (6/6 flops)\n",
" MultipleGridAnchorGenerator/mul_34 (5/5 flops)\n",
" MultipleGridAnchorGenerator/mul_33 (5/5 flops)\n",
" MultipleGridAnchorGenerator/mul_42 (3/3 flops)\n",
" MultipleGridAnchorGenerator/truediv_14 (3/3 flops)\n",
" MultipleGridAnchorGenerator/mul_14 (3/3 flops)\n",
" MultipleGridAnchorGenerator/mul_15 (3/3 flops)\n",
" MultipleGridAnchorGenerator/mul_16 (3/3 flops)\n",
" MultipleGridAnchorGenerator/mul_41 (3/3 flops)\n",
" MultipleGridAnchorGenerator/mul_49 (2/2 flops)\n",
" MultipleGridAnchorGenerator/mul_50 (2/2 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_179 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_18 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_28 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_29 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_3 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_19 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_178 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_177 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_176 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_175 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_152 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_2 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_27 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_26 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_25 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_20 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_24 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_174 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_23 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_22 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_21 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_40 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_50 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_5 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_49 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_48 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_47 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_46 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_45 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_44 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_43 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_42 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_41 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_30 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_4 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_39 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_38 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_37 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_36 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_35 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_34 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_33 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_32 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_31 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_144 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_153 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_78 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_151 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_150 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_15 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_149 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_148 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_147 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_146 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_145 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_154 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_143 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_142 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_141 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_140 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_14 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_139 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_138 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_137 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_136 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_135 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_163 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_172 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_171 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_170 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_17 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_169 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_168 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_167 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_166 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_165 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_164 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_173 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_162 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_161 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_160 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_16 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_159 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_158 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_157 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_156 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_155 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_1 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_1 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_9 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_8 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_7 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_6 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_5 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_4 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_3 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater_2 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_10 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/Greater (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_99 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_98 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_97 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_96 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_95 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_94 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_93 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_92 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_91 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_2 (1/1 flops)\n",
" Preprocessor/map/while/Less_1 (1/1 flops)\n",
" Preprocessor/map/while/Less (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/ones/Less (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_9 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_8 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_7 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_6 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_5 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_4 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_3 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_90 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_19 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_18 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_17 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_16 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_15 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_14 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_13 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_12 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/PadOrClipBoxList/sub_11 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_61 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_70 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_7 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_69 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_68 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_67 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_66 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_65 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_64 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_63 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_62 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_71 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_60 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_6 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_59 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_58 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_57 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_56 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_55 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_54 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_53 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_52 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_80 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_9 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_89 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_88 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_87 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_86 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_85 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_84 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_83 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_82 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_81 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_51 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_8 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_79 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_108 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_77 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_76 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_75 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_74 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_73 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_72 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_22 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_31 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_30 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_3 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_29 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_28 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_27 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_26 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_25 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_24 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_23 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_32 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_21 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_20 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_2 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_19 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_18 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_17 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_16 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_15 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_14 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_13 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_41 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_50 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_5 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_49 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_48 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_47 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_46 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_45 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_44 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_43 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_42 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_12 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_40 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_4 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_39 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_38 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_37 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_36 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_35 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_34 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_33 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_5 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_11 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_10 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_1 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_9 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_8 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_7 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_6 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_58 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_57 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_12 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_4 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_3 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_2 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_13 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_12 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_11 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_10 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul_1 (1/1 flops)\n",
" MultipleGridAnchorGenerator/mul (1/1 flops)\n",
" MultipleGridAnchorGenerator/assert_equal_1/Equal (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/Less (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_11 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_10 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_1 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Greater (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ChangeCoordinateFrame/truediv_1 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ChangeCoordinateFrame/truediv (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ChangeCoordinateFrame/sub_1 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/ChangeCoordinateFrame/sub (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/Less_1 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_51 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_9 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_8 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_7 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_6 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_5 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_4 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_3 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_2 (1/1 flops)\n",
" MultipleGridAnchorGenerator/truediv_13 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_105 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_114 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_113 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_112 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_111 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_110 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_11 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_109 (1/1 flops)\n",
" MultipleGridAnchorGenerator/Minimum (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_107 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_106 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_115 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_104 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_103 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_102 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_101 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_100 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_10 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_1 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField_1/Equal (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/SortByField/Equal (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_124 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_133 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_132 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_131 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_130 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_13 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_129 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_128 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_127 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_126 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_125 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_90 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_123 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_122 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_121 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_120 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_12 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_119 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_118 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_117 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_116 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_61 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_70 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_7 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_69 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_68 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_67 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_66 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_65 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_64 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_63 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_62 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_71 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_60 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_6 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_59 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_58 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_57 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_56 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_55 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_54 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_53 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_52 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_80 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_9 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_89 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_88 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_87 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_86 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_85 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_84 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_83 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_82 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_81 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/sub_134 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_8 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_79 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_78 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_77 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_76 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_75 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_74 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_73 (1/1 flops)\n",
" Postprocessor/BatchMultiClassNonMaxSuppression/map/while/MultiClassNonMaxSuppression/Minimum_72 (1/1 flops)\n",
"\n",
"======================End of Report==========================\n",
"2021-10-23 11:11:36.814434: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:11:36.854613: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:36.855200: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:11:36.857633: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:37.019371: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:11:37.035659: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:11:37.048325: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:11:37.218997: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:11:37.229421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:11:37.530988: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:11:37.531150: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.531877: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.532421: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:11:37.544470: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:11:37.544640: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55fcdc6a7800 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:11:37.544666: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:11:37.785688: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.786507: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55fcdc6a6f40 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:11:37.786537: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:11:37.786714: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.787268: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:11:37.787345: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:37.787374: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:11:37.787397: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:11:37.787421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:11:37.787441: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:11:37.787461: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:11:37.787480: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:11:37.787557: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.788129: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.788660: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:11:37.791321: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:37.792598: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:11:37.792628: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:11:37.792639: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:11:37.793444: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.794098: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:37.794636: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:11:37.794681: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssd_mobilenet_v2_coco_2018_03_29/model.ckpt\n",
"I1023 11:11:37.796345 140575728891776 saver.py:1284] Restoring parameters from /content/ssd_mobilenet_v2_coco_2018_03_29/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:11:42.583157 140575728891776 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:11:43.825487: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:43.826105: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:11:43.826190: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:43.826219: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:11:43.826244: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:11:43.826268: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:11:43.826311: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:11:43.826336: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:11:43.826360: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:11:43.826455: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:43.827045: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:43.827615: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:11:43.827698: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:11:43.827717: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:11:43.827734: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:11:43.827853: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:43.828472: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:43.829020: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssd_mobilenet_v2_coco_2018_03_29/model.ckpt\n",
"I1023 11:11:43.830317 140575728891776 saver.py:1284] Restoring parameters from /content/ssd_mobilenet_v2_coco_2018_03_29/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:11:44.789341 140575728891776 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:11:44.789577 140575728891776 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 344 variables.\n",
"I1023 11:11:45.387063 140575728891776 graph_util_impl.py:334] Froze 344 variables.\n",
"INFO:tensorflow:Converted 344 variables to const ops.\n",
"I1023 11:11:45.550048 140575728891776 graph_util_impl.py:394] Converted 344 variables to const ops.\n",
"2021-10-23 11:11:45.884345: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:45.884979: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:11:45.885066: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:45.885092: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:11:45.885119: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:11:45.885139: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:11:45.885160: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:11:45.885179: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:11:45.885199: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:11:45.885320: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:45.885916: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:45.886495: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:11:45.886538: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:11:45.886553: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:11:45.886563: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:11:45.886668: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:45.887213: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:45.887778: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/object_detection/exporter.py:384: build_tensor_info (from tensorflow.python.saved_model.utils_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.build_tensor_info or tf.compat.v1.saved_model.build_tensor_info.\n",
"W1023 11:11:46.917553 140575728891776 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/object_detection/exporter.py:384: build_tensor_info (from tensorflow.python.saved_model.utils_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"This function will only be available through the v1 compatibility library as tf.compat.v1.saved_model.utils.build_tensor_info or tf.compat.v1.saved_model.build_tensor_info.\n",
"INFO:tensorflow:No assets to save.\n",
"I1023 11:11:46.918620 140575728891776 builder_impl.py:640] No assets to save.\n",
"INFO:tensorflow:No assets to write.\n",
"I1023 11:11:46.918781 140575728891776 builder_impl.py:460] No assets to write.\n",
"INFO:tensorflow:SavedModel written to: /content/ssd_mobilenet_v2_coco_2018_03_29_new/saved_model/saved_model.pb\n",
"I1023 11:11:47.563618 140575728891776 builder_impl.py:425] SavedModel written to: /content/ssd_mobilenet_v2_coco_2018_03_29_new/saved_model/saved_model.pb\n",
"INFO:tensorflow:Writing pipeline config file to /content/ssd_mobilenet_v2_coco_2018_03_29_new/pipeline.config\n",
"I1023 11:11:47.606063 140575728891776 config_util.py:254] Writing pipeline config file to /content/ssd_mobilenet_v2_coco_2018_03_29_new/pipeline.config\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "QvNXdwscRngf",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "03d5cd9b-ee90-412d-97d0-c762a67e1a26"
},
"source": [
"!python object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssd_mobilenet_v2_coco_2018_03_29_new/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssd_mobilenet_v2_coco_2018_03_29_new/model.ckpt\" \\\n",
" --output_directory=\"/content/ssd_mobilenet_v2_coco_2018_03_29_new/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 14,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:11:51.064945 140277540132736 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:53.226733 140277540132736 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:53.255108 140277540132736 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:53.282644 140277540132736 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:53.309466 140277540132736 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:53.336965 140277540132736 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:11:53.364087 140277540132736 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"2021-10-23 11:11:53.403096: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:11:53.416187: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.416765: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:11:53.417047: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:53.418552: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:11:53.426998: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:11:53.427275: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:11:53.428877: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:11:53.438657: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:11:53.443903: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:11:53.444024: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.444677: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.445236: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:11:53.450638: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:11:53.450835: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55eb8f0012c0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:11:53.450867: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:11:53.664005: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.664842: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55eb8f001d40 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:11:53.664876: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:11:53.665052: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.665620: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:11:53.665693: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:53.665720: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:11:53.665742: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:11:53.665764: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:11:53.665784: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:11:53.665804: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:11:53.665824: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:11:53.665904: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.666496: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.666993: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:11:53.667053: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:53.668190: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:11:53.668218: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:11:53.668229: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:11:53.668361: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.668925: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:53.669453: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:11:53.669493: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:11:54.102297 140277540132736 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:11:54.577066: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:54.577707: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:11:54.577799: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:11:54.577837: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:11:54.577862: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:11:54.577891: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:11:54.577915: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:11:54.577938: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:11:54.577962: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:11:54.578056: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:54.578648: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:54.579170: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:11:54.579214: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:11:54.579233: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:11:54.579246: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:11:54.579358: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:54.579937: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:11:54.580478: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssd_mobilenet_v2_coco_2018_03_29_new/model.ckpt\n",
"I1023 11:11:54.581665 140277540132736 saver.py:1284] Restoring parameters from /content/ssd_mobilenet_v2_coco_2018_03_29_new/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:11:55.465213 140277540132736 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:11:55.465507 140277540132736 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 344 variables.\n",
"I1023 11:11:55.729024 140277540132736 graph_util_impl.py:334] Froze 344 variables.\n",
"INFO:tensorflow:Converted 344 variables to const ops.\n",
"I1023 11:11:55.830011 140277540132736 graph_util_impl.py:394] Converted 344 variables to const ops.\n",
"2021-10-23 11:11:55.994666: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "2C9OzVD3zDM-",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "b633f9cc-1ea2-40d7-ae62-61fef369fdb9"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssd_mobilenet_v2_coco_2018_03_29_new/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssd_mobilenet_v2_300x300_coco.tflite\" \\\n",
" --inference_input_type=QUANTIZED_UINT8 \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,300,300,3 \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 15,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:11:59.994233: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:12:00.007186: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.007807: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:00.008089: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:00.009656: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:00.013232: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:00.013564: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:00.015164: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:00.016209: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:00.019583: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:00.019691: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.020270: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.020802: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:00.025998: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:12:00.026192: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ac26dfad80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:00.026220: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:12:00.241805: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.242610: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ac26dfb800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:00.242641: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:12:00.242807: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.243374: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:00.243435: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:00.243456: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:00.243475: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:00.243493: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:00.243510: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:00.243526: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:00.243544: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:00.243610: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.244160: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.244689: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:00.244761: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:00.245735: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:00.245761: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:00.245771: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:00.245881: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.246478: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:00.246988: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:12:00.247027: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "3gz-AFsXGW4z",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "7986c2d0-8fc8-48d6-8c82-ff2c12c21afb"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssd_mobilenet_v2_coco_2018_03_29_new/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssd_mobilenet_v2_300x300_coco_fp16.tflite\" \\\n",
" --inference_input_type=FLOAT \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,300,300,3 \\\n",
" --quantize_to_float16 \\\n",
" --post_training_quantize \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 16,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:12:05.682348: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:12:05.695077: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.695679: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:05.695935: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:05.697400: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:05.698440: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:05.698715: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:05.700258: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:05.701180: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:05.704547: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:05.704648: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.705211: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.705719: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:05.710441: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:12:05.710632: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x563b9442ad80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:05.710659: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:12:05.932661: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.933515: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x563b9442b800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:05.933546: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:12:05.933711: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.934241: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:05.934306: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:05.934335: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:05.934355: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:05.934372: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:05.934388: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:05.934405: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:05.934423: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:05.934488: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.935065: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.935593: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:05.935659: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:05.936627: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:05.936652: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:05.936668: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:05.936773: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.937359: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:05.937886: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:12:05.937924: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "vFg_gmgAVxqO"
},
"source": [
"## ssdlite_mobilenet_v2_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "zMJPhYqJWKsB",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "dbece626-a259-43ff-8a85-cee5cbcbb6a0"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz -P /content/\n",
"!tar xf /content/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz -C /content/"
],
"execution_count": 17,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:12:09-- http://download.tensorflow.org/models/object_detection/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c01::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 51025348 (49M) [application/x-tar]\n",
"Saving to: ‘/content/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz’\n",
"\n",
"ssdlite_mobilenet_v 100%[===================>] 48.66M 38.5MB/s in 1.3s \n",
"\n",
"2021-10-23 11:12:11 (38.5 MB/s) - ‘/content/ssdlite_mobilenet_v2_coco_2018_05_09.tar.gz’ saved [51025348/51025348]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "TYeSfyYdc_ju",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "8f0874af-ccf7-483e-f0c7-459fb501e46f"
},
"source": [
"!python object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssdlite_mobilenet_v2_coco_2018_05_09/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssdlite_mobilenet_v2_coco_2018_05_09/model.ckpt\" \\\n",
" --output_directory=\"/content/ssdlite_mobilenet_v2_coco_2018_05_09/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 18,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:12:14.589347 140020409460608 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:12:16.658270 140020409460608 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:12:16.731728 140020409460608 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:12:16.817886 140020409460608 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:12:16.890379 140020409460608 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:12:16.968906 140020409460608 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:12:17.045240 140020409460608 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"2021-10-23 11:12:17.129111: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:12:17.142160: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.142975: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:17.143362: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:17.146191: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:17.148821: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:17.149126: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:17.159121: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:17.160004: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:17.163587: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:17.163702: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.164296: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.164795: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:17.173432: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:12:17.173597: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b5538252c0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:17.173623: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:12:17.394802: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.395614: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b553825d40 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:17.395648: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:12:17.395812: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.396358: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:17.396425: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:17.396453: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:17.396475: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:17.396506: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:17.396527: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:17.396546: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:17.396564: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:17.396636: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.397180: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.397698: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:17.397761: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:17.398891: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:17.398917: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:17.398927: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:17.399036: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.399616: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:17.400120: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:12:17.400158: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:12:17.804054 140020409460608 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:12:18.300414: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:18.301005: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:18.301094: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:18.301122: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:18.301148: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:18.301171: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:18.301192: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:18.301214: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:18.301237: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:18.301343: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:18.301900: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:18.302407: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:18.302447: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:18.302461: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:18.302470: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:18.302567: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:18.303123: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:18.303636: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssdlite_mobilenet_v2_coco_2018_05_09/model.ckpt\n",
"I1023 11:12:18.304629 140020409460608 saver.py:1284] Restoring parameters from /content/ssdlite_mobilenet_v2_coco_2018_05_09/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:12:19.206504 140020409460608 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:12:19.206747 140020409460608 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 404 variables.\n",
"I1023 11:12:19.513733 140020409460608 graph_util_impl.py:334] Froze 404 variables.\n",
"INFO:tensorflow:Converted 404 variables to const ops.\n",
"I1023 11:12:19.569543 140020409460608 graph_util_impl.py:394] Converted 404 variables to const ops.\n",
"2021-10-23 11:12:19.656428: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "ZmDREj0dcvDY",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "9a9a973e-732b-4560-d3d8-dc9b0f6f6815"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssdlite_mobilenet_v2_coco_2018_05_09/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssdlite_mobilenet_v2_coco.tflite\" \\\n",
" --inference_input_type=QUANTIZED_UINT8 \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,300,300,3 \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 19,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:12:22.243525: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:12:22.256324: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.256878: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:22.257122: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:22.258604: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:22.259651: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:22.259936: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:22.261504: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:22.262456: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:22.265846: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:22.265946: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.266553: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.267070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:22.271683: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:12:22.271876: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55f1eed20d80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:22.271905: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:12:22.482716: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.483553: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55f1eed21800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:22.483587: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:12:22.483746: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.484357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:22.484414: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:22.484436: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:22.484455: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:22.484474: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:22.484492: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:22.484509: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:22.484527: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:22.484594: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.485193: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.485717: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:22.485782: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:22.486753: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:22.486778: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:22.486790: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:22.486900: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.487488: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:22.487999: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:12:22.488036: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "CbT2UNYydXPt",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "015ac00e-d9f1-4171-dbbc-f5416dcb8d22"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssdlite_mobilenet_v2_coco_2018_05_09/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssdlite_mobilenet_v2_coco_fp16.tflite\" \\\n",
" --inference_input_type=FLOAT \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,300,300,3 \\\n",
" --quantize_to_float16 \\\n",
" --post_training_quantize \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 20,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:12:26.532607: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:12:26.545573: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.546141: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:26.546425: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:26.548085: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:26.549120: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:26.549422: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:26.550965: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:26.551930: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:26.555262: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:26.555378: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.555941: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.556456: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:26.561131: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:12:26.561326: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x563fdca08d80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:26.561354: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:12:26.777368: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.778188: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x563fdca09800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:26.778223: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:12:26.778410: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.778938: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:26.778993: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:26.779014: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:26.779033: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:26.779053: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:26.779070: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:26.779087: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:26.779105: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:26.779165: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.779747: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.780242: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:26.780325: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:26.781257: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:26.781291: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:26.781302: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:26.781405: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.782117: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:26.782680: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:12:26.782723: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "NY4nlD9ypgBF"
},
"source": [
"## ssd_mobilenet_v2_coco_quant"
]
},
{
"cell_type": "code",
"metadata": {
"id": "XxyqlyXTpe3W",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "939d77fe-ffa3-4b55-f0de-5013f5e7556d"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz -P /content/\n",
"!tar xf /content/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz -C /content/"
],
"execution_count": 21,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:12:29-- http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c01::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 144806142 (138M) [application/x-tar]\n",
"Saving to: ‘/content/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz’\n",
"\n",
"ssd_mobilenet_v2_qu 100%[===================>] 138.10M 52.6MB/s in 2.6s \n",
"\n",
"2021-10-23 11:12:32 (52.6 MB/s) - ‘/content/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03.tar.gz’ saved [144806142/144806142]\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "GskYdyxJs7S1"
},
"source": [
"Convert tflite graph to tflite model.<br>\n",
"Note: Pre-trained model is a quantized model."
]
},
{
"cell_type": "code",
"metadata": {
"id": "FQ2CEzfKo0vP",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "a25802e7-0796-4f40-9f48-545cb125dbeb"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --output_file=\"/content/tflite_models/ssd_mobilenet_v2_300x300_quant_coco.tflite\" \\\n",
" --graph_def_file=\"/content/ssd_mobilenet_v2_quantized_300x300_coco_2019_01_03/tflite_graph.pb\" \\\n",
" --inference_type=QUANTIZED_UINT8 \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --input_shapes=1,300,300,3 \\\n",
" --change_concat_input_ranges=false \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 22,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:12:36.428247: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:12:36.441229: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.441870: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:36.442139: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:36.443651: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:36.444706: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:36.444984: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:36.446563: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:36.447517: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:36.450912: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:36.451003: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.451596: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.452101: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:36.457399: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:12:36.457580: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5607cd702d80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:36.457608: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:12:36.670993: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.671808: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5607cd703800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:36.671843: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:12:36.672004: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.672578: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:36.672635: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:36.672655: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:36.672674: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:36.672692: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:36.672710: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:36.672726: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:36.672744: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:36.672810: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.673378: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.673873: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:36.673935: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:36.674879: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:36.674905: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:36.674916: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:36.675014: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.675582: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:36.676089: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:12:36.676129: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "vRDeYi0jtV7H"
},
"source": [
"Compile EdgeTPU Model."
]
},
{
"cell_type": "code",
"metadata": {
"id": "GYLWVklhrAcj",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "4be7bdeb-bb23-4246-c25f-83d99057039d"
},
"source": [
"!edgetpu_compiler -s \\\n",
" -o /content/tflite_models/ \\\n",
" /content/tflite_models/ssd_mobilenet_v2_300x300_quant_coco.tflite"
],
"execution_count": 23,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Edge TPU Compiler version 16.0.384591198\n",
"Started a compilation timeout timer of 180 seconds.\n",
"\n",
"Model compiled successfully in 929 ms.\n",
"\n",
"Input model: /content/tflite_models/ssd_mobilenet_v2_300x300_quant_coco.tflite\n",
"Input size: 5.89MiB\n",
"Output model: /content/tflite_models/ssd_mobilenet_v2_300x300_quant_coco_edgetpu.tflite\n",
"Output size: 6.56MiB\n",
"On-chip memory used for caching model parameters: 6.35MiB\n",
"On-chip memory remaining for caching model parameters: 1.27MiB\n",
"Off-chip memory used for streaming uncached model parameters: 0.00B\n",
"Number of Edge TPU subgraphs: 1\n",
"Total number of operations: 99\n",
"Operation log: /content/tflite_models/ssd_mobilenet_v2_300x300_quant_coco_edgetpu.log\n",
"\n",
"Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.\n",
"Number of operations that will run on Edge TPU: 98\n",
"Number of operations that will run on CPU: 1\n",
"\n",
"Operator Count Status\n",
"\n",
"CUSTOM 1 Operation is working on an unsupported data type\n",
"ADD 10 Mapped to Edge TPU\n",
"CONCATENATION 2 Mapped to Edge TPU\n",
"RESHAPE 13 Mapped to Edge TPU\n",
"LOGISTIC 1 Mapped to Edge TPU\n",
"CONV_2D 55 Mapped to Edge TPU\n",
"DEPTHWISE_CONV_2D 17 Mapped to Edge TPU\n",
"Compilation child process completed within timeout period.\n",
"Compilation succeeded! \n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "GSqs8KdJtyBL"
},
"source": [
"## ssd_mobilenet_v3_large_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "gwWUfTGztcY3",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "6226f9a2-45d5-4520-c54c-8d41c0a76d63"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v3_large_coco_2020_01_14.tar.gz -P /content/\n",
"!tar xf /content/ssd_mobilenet_v3_large_coco_2020_01_14.tar.gz -C /content/\n",
"!mv /content/ssd_mobilenet_v3_large_coco_2020_01_14/model.tflite /content/tflite_models/ssd_mobilenet_v3_large_320x320_coco.tflite"
],
"execution_count": 24,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:12:40-- http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v3_large_coco_2020_01_14.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 108.177.125.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|108.177.125.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 49318766 (47M) [application/gzip]\n",
"Saving to: ‘/content/ssd_mobilenet_v3_large_coco_2020_01_14.tar.gz’\n",
"\n",
"ssd_mobilenet_v3_la 100%[===================>] 47.03M 31.7MB/s in 1.5s \n",
"\n",
"2021-10-23 11:12:43 (31.7 MB/s) - ‘/content/ssd_mobilenet_v3_large_coco_2020_01_14.tar.gz’ saved [49318766/49318766]\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "e_qOcfON3uzR"
},
"source": [
"## ssd_mobilenet_v3_small_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "uhk8tS6V24Kb",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "ece8545a-0c60-4667-d076-245e12052a3f"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v3_small_coco_2020_01_14.tar.gz -P /content/\n",
"!tar xf /content/ssd_mobilenet_v3_small_coco_2020_01_14.tar.gz -C /content/\n",
"!mv /content/ssd_mobilenet_v3_small_coco_2020_01_14/model.tflite /content/tflite_models/ssd_mobilenet_v3_small_320x320_coco.tflite"
],
"execution_count": 25,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:12:44-- http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v3_small_coco_2020_01_14.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 27341125 (26M) [application/gzip]\n",
"Saving to: ‘/content/ssd_mobilenet_v3_small_coco_2020_01_14.tar.gz’\n",
"\n",
"ssd_mobilenet_v3_sm 100%[===================>] 26.07M 28.1MB/s in 0.9s \n",
"\n",
"2021-10-23 11:12:45 (28.1 MB/s) - ‘/content/ssd_mobilenet_v3_small_coco_2020_01_14.tar.gz’ saved [27341125/27341125]\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "2A5WFruU4OFn"
},
"source": [
"## ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "UNHeIhXf4NuQ",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "4e355ac3-7a58-4306-eb92-1e6b83ddf788"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18.tar.gz -P /content/\n",
"!tar xf /content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18.tar.gz -C /content/"
],
"execution_count": 26,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:12:46-- http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 108.177.125.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|108.177.125.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 37875375 (36M) [application/x-tar]\n",
"Saving to: ‘/content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18.tar.gz’\n",
"\n",
"ssd_mobilenet_v2_mn 100%[===================>] 36.12M 21.0MB/s in 1.7s \n",
"\n",
"2021-10-23 11:12:48 (21.0 MB/s) - ‘/content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18.tar.gz’ saved [37875375/37875375]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "NzTwSeJwY_OI",
"outputId": "b87ee10b-3176-4893-8cae-330bf3260344"
},
"source": [
"!python3 object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18/model.ckpt\" \\\n",
" --output_directory=\"/content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 27,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:12:52.157389 139703892219776 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"ERROR:tensorflow:C6: Tensor(\"FeatureExtractor/MnasFPN/Identity:0\", shape=(1, 5, 5, 48), dtype=float32)\n",
"E1023 11:12:53.390349 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] C6: Tensor(\"FeatureExtractor/MnasFPN/Identity:0\", shape=(1, 5, 5, 48), dtype=float32)\n",
"ERROR:tensorflow:layer_1: Tensor(\"FeatureExtractor/MobilenetV2/Conv/Relu6:0\", shape=(1, 160, 160, 32), dtype=float32)\n",
"E1023 11:12:53.390557 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_1: Tensor(\"FeatureExtractor/MobilenetV2/Conv/Relu6:0\", shape=(1, 160, 160, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_10: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.390666 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_10: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"ERROR:tensorflow:layer_10/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.390766 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_10/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_10/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.390870 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_10/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_10/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.390963 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_10/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_8/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"ERROR:tensorflow:layer_11: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.391058 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_11: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"ERROR:tensorflow:layer_11/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.391154 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_11/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_11/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.391249 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_11/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_11/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.391351 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_11/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_9/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"ERROR:tensorflow:layer_12: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"E1023 11:12:53.391440 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_12: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_12/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.391529 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_12/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_12/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.391634 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_12/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_12/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"E1023 11:12:53.391724 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_12/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_10/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_13: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"E1023 11:12:53.391811 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_13: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_13/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"E1023 11:12:53.391910 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_13/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/depthwise_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"ERROR:tensorflow:layer_13/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/expansion_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"E1023 11:12:53.392005 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_13/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/expansion_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"ERROR:tensorflow:layer_13/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"E1023 11:12:53.392094 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_13/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_11/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_14: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"E1023 11:12:53.392180 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_14: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_14/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"E1023 11:12:53.392267 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_14/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/depthwise_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"ERROR:tensorflow:layer_14/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/expansion_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"E1023 11:12:53.392371 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_14/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/expansion_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"ERROR:tensorflow:layer_14/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"E1023 11:12:53.392461 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_14/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_12/output:0\", shape=(1, 20, 20, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_15: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"E1023 11:12:53.392554 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_15: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"ERROR:tensorflow:layer_15/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise_output:0\", shape=(1, 10, 10, 576), dtype=float32)\n",
"E1023 11:12:53.392648 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_15/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/depthwise_output:0\", shape=(1, 10, 10, 576), dtype=float32)\n",
"ERROR:tensorflow:layer_15/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/expansion_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"E1023 11:12:53.392740 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_15/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/expansion_output:0\", shape=(1, 20, 20, 576), dtype=float32)\n",
"ERROR:tensorflow:layer_15/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"E1023 11:12:53.392833 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_15/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_13/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"ERROR:tensorflow:layer_16: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"E1023 11:12:53.392922 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_16: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"ERROR:tensorflow:layer_16/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"E1023 11:12:53.393015 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_16/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/depthwise_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"ERROR:tensorflow:layer_16/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/expansion_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"E1023 11:12:53.393109 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_16/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/expansion_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"ERROR:tensorflow:layer_16/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"E1023 11:12:53.393197 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_16/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_14/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"ERROR:tensorflow:layer_17: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"E1023 11:12:53.393290 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_17: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"ERROR:tensorflow:layer_17/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"E1023 11:12:53.393385 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_17/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/depthwise_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"ERROR:tensorflow:layer_17/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/expansion_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"E1023 11:12:53.393478 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_17/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/expansion_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"ERROR:tensorflow:layer_17/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"E1023 11:12:53.393566 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_17/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_15/output:0\", shape=(1, 10, 10, 160), dtype=float32)\n",
"ERROR:tensorflow:layer_18: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/output:0\", shape=(1, 10, 10, 320), dtype=float32)\n",
"E1023 11:12:53.393651 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_18: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/output:0\", shape=(1, 10, 10, 320), dtype=float32)\n",
"ERROR:tensorflow:layer_18/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"E1023 11:12:53.393737 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_18/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/depthwise_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"ERROR:tensorflow:layer_18/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/expansion_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"E1023 11:12:53.393835 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_18/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/expansion_output:0\", shape=(1, 10, 10, 960), dtype=float32)\n",
"ERROR:tensorflow:layer_18/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/output:0\", shape=(1, 10, 10, 320), dtype=float32)\n",
"E1023 11:12:53.393924 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_18/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_16/output:0\", shape=(1, 10, 10, 320), dtype=float32)\n",
"ERROR:tensorflow:layer_2: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv/output:0\", shape=(1, 160, 160, 16), dtype=float32)\n",
"E1023 11:12:53.394011 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_2: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv/output:0\", shape=(1, 160, 160, 16), dtype=float32)\n",
"ERROR:tensorflow:layer_2/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv/depthwise_output:0\", shape=(1, 160, 160, 32), dtype=float32)\n",
"E1023 11:12:53.394098 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_2/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv/depthwise_output:0\", shape=(1, 160, 160, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_2/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv/output:0\", shape=(1, 160, 160, 16), dtype=float32)\n",
"E1023 11:12:53.394189 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_2/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv/output:0\", shape=(1, 160, 160, 16), dtype=float32)\n",
"ERROR:tensorflow:layer_3: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"E1023 11:12:53.394274 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_3: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"ERROR:tensorflow:layer_3/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise_output:0\", shape=(1, 80, 80, 96), dtype=float32)\n",
"E1023 11:12:53.394378 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_3/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/depthwise_output:0\", shape=(1, 80, 80, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_3/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/expansion_output:0\", shape=(1, 160, 160, 96), dtype=float32)\n",
"E1023 11:12:53.394472 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_3/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/expansion_output:0\", shape=(1, 160, 160, 96), dtype=float32)\n",
"ERROR:tensorflow:layer_3/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"E1023 11:12:53.457072 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_3/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_1/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"ERROR:tensorflow:layer_4: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"E1023 11:12:53.457219 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_4: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"ERROR:tensorflow:layer_4/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise_output:0\", shape=(1, 80, 80, 144), dtype=float32)\n",
"E1023 11:12:53.457359 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_4/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/depthwise_output:0\", shape=(1, 80, 80, 144), dtype=float32)\n",
"ERROR:tensorflow:layer_4/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/expansion_output:0\", shape=(1, 80, 80, 144), dtype=float32)\n",
"E1023 11:12:53.457480 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_4/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/expansion_output:0\", shape=(1, 80, 80, 144), dtype=float32)\n",
"ERROR:tensorflow:layer_4/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"E1023 11:12:53.457596 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_4/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_2/output:0\", shape=(1, 80, 80, 24), dtype=float32)\n",
"ERROR:tensorflow:layer_5: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"E1023 11:12:53.457714 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_5: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_5/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise_output:0\", shape=(1, 40, 40, 144), dtype=float32)\n",
"E1023 11:12:53.457858 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_5/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/depthwise_output:0\", shape=(1, 40, 40, 144), dtype=float32)\n",
"ERROR:tensorflow:layer_5/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/expansion_output:0\", shape=(1, 80, 80, 144), dtype=float32)\n",
"E1023 11:12:53.457989 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_5/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/expansion_output:0\", shape=(1, 80, 80, 144), dtype=float32)\n",
"ERROR:tensorflow:layer_5/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"E1023 11:12:53.458108 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_5/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_3/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_6: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"E1023 11:12:53.458241 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_6: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_6/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"E1023 11:12:53.458384 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_6/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/depthwise_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"ERROR:tensorflow:layer_6/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/expansion_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"E1023 11:12:53.458514 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_6/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/expansion_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"ERROR:tensorflow:layer_6/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"E1023 11:12:53.458638 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_6/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_4/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_7: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"E1023 11:12:53.458763 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_7: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_7/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"E1023 11:12:53.458897 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_7/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/depthwise_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"ERROR:tensorflow:layer_7/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/expansion_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"E1023 11:12:53.459021 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_7/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/expansion_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"ERROR:tensorflow:layer_7/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"E1023 11:12:53.459140 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_7/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_5/output:0\", shape=(1, 40, 40, 32), dtype=float32)\n",
"ERROR:tensorflow:layer_8: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.459264 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_8: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"ERROR:tensorflow:layer_8/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise_output:0\", shape=(1, 20, 20, 192), dtype=float32)\n",
"E1023 11:12:53.459409 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_8/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/depthwise_output:0\", shape=(1, 20, 20, 192), dtype=float32)\n",
"ERROR:tensorflow:layer_8/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/expansion_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"E1023 11:12:53.459540 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_8/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/expansion_output:0\", shape=(1, 40, 40, 192), dtype=float32)\n",
"ERROR:tensorflow:layer_8/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.459664 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_8/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_6/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"ERROR:tensorflow:layer_9: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.459786 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_9: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"ERROR:tensorflow:layer_9/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.459917 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_9/depthwise_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/depthwise_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_9/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"E1023 11:12:53.460041 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_9/expansion_output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/expansion_output:0\", shape=(1, 20, 20, 384), dtype=float32)\n",
"ERROR:tensorflow:layer_9/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"E1023 11:12:53.460160 139703892219776 ssd_mobilenet_v2_mnasfpn_feature_extractor.py:396] layer_9/output: Tensor(\"FeatureExtractor/MobilenetV2/expanded_conv_7/output:0\", shape=(1, 20, 20, 64), dtype=float32)\n",
"2021-10-23 11:12:55.926251: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:12:55.940452: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:55.941017: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:55.941300: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:55.942870: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:55.943963: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:55.944261: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:55.945882: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:55.946868: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:55.950478: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:55.950585: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:55.951195: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:55.951795: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:55.956967: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:12:55.957142: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b1e76c8bc0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:55.957169: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:12:56.181735: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:56.182633: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b1e76c99c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:12:56.182664: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:12:56.182840: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:56.183453: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:56.183531: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:56.183557: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:56.183583: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:56.183604: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:56.183624: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:56.183647: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:56.183672: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:56.183748: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:56.184355: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:56.184881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:56.184957: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:56.186191: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:56.186221: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:56.186232: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:56.186375: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:56.187001: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:56.187601: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:12:56.187642: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Found and fixed 12 matches\n",
"I1023 11:12:56.413885 139703892219776 exporter.py:140] Found and fixed 12 matches\n",
"INFO:tensorflow:Found and fixed 0 matches\n",
"I1023 11:12:56.442941 139703892219776 exporter.py:140] Found and fixed 0 matches\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:12:56.916164 139703892219776 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:12:57.662440: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:57.663021: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:12:57.663104: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:12:57.663127: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:12:57.663149: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:12:57.663169: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:12:57.663193: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:12:57.663212: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:12:57.663231: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:12:57.663334: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:57.663891: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:57.664403: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:12:57.664442: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:12:57.664456: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:12:57.664469: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:12:57.664558: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:57.665110: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:12:57.665645: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18/model.ckpt\n",
"I1023 11:12:57.666734 139703892219776 saver.py:1284] Restoring parameters from /content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:12:58.915059 139703892219776 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:12:58.915306 139703892219776 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 658 variables.\n",
"I1023 11:12:59.423777 139703892219776 graph_util_impl.py:334] Froze 658 variables.\n",
"INFO:tensorflow:Converted 658 variables to const ops.\n",
"I1023 11:12:59.489880 139703892219776 graph_util_impl.py:394] Converted 658 variables to const ops.\n",
"2021-10-23 11:12:59.604478: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "xTLOnplwZV13",
"outputId": "a5447e17-001e-4204-d21f-1782d139d9c6"
},
"source": [
"!tflite_convert \\\n",
" --output_file=\"/content/tflite_models/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco.tflite\" \\\n",
" --graph_def_file=\"/content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18/tflite/tflite_graph.pb\" \\\n",
" --inference_input_type=QUANTIZED_UINT8 \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,320,320,3 \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 28,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:13:02.085549: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:13:02.098702: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.099721: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:02.100049: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:02.102036: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:02.103521: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:02.103879: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:02.106127: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:02.107419: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:02.112480: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:02.112581: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.113158: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.113697: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:02.118492: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:13:02.118689: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x562524954d80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:02.118716: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:13:02.327882: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.328689: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x562524955800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:02.328725: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:13:02.328902: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.329473: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:02.329529: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:02.329549: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:02.329567: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:02.329584: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:02.329601: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:02.329618: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:02.329635: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:02.329698: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.330249: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.330752: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:02.330826: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:02.331782: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:02.331807: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:02.331830: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:02.331933: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.332496: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:02.333100: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:13:02.333160: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "xgNoytegZ0Kc",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "5b53d22c-a905-46cf-cf9e-853a1cdb8200"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --output_file=\"/content/tflite_models/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_fp16.tflite\" \\\n",
" --graph_def_file=\"/content/ssd_mobilenet_v2_mnasfpn_shared_box_predictor_320x320_coco_sync_2020_05_18/tflite/tflite_graph.pb\" \\\n",
" --inference_input_type=FLOAT \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,320,320,3 \\\n",
" --quantize_to_float16 \\\n",
" --post_training_quantize \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 29,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:13:06.420265: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:13:06.433195: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.433768: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:06.434037: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:06.435541: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:06.436603: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:06.436883: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:06.438498: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:06.439498: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:06.443003: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:06.443104: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.443674: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.444178: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:06.448854: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:13:06.449031: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55624cd43100 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:06.449057: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:13:06.653504: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.654301: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55624cd432c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:06.654342: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:13:06.654504: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.655031: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:06.655081: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:06.655100: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:06.655118: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:06.655137: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:06.655155: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:06.655172: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:06.655189: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:06.655254: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.655821: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.656333: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:06.656410: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:06.657540: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:06.657565: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:06.657578: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:06.657681: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.658224: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:06.658753: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:13:06.658795: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "KJs7Z8jC5jgH"
},
"source": [
"## ssdlite_mobiledet_cpu_320x320_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "kU1XmsMI4qrv",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "0bd54fc4-635f-4fdd-8c96-4da53d65dfae"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19.tar.gz -P /content/\n",
"!tar xf /content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19.tar.gz -C /content/"
],
"execution_count": 30,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:13:09-- http://download.tensorflow.org/models/object_detection/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 85014433 (81M) [application/x-tar]\n",
"Saving to: ‘/content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19.tar.gz’\n",
"\n",
"ssdlite_mobiledet_c 100%[===================>] 81.08M 41.0MB/s in 2.0s \n",
"\n",
"2021-10-23 11:13:11 (41.0 MB/s) - ‘/content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19.tar.gz’ saved [85014433/85014433]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "-bC1nqn0UGH3",
"outputId": "fd9e7bee-3128-4540-e092-795d0627fad9"
},
"source": [
"!python3 object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19/model.ckpt-400000\" \\\n",
" --output_directory=\"/content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 31,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:13:15.648403 140644938663808 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:18.314104 140644938663808 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:18.387718 140644938663808 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:18.455140 140644938663808 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:18.523511 140644938663808 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:18.594480 140644938663808 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:18.662077 140644938663808 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"2021-10-23 11:13:18.741182: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:13:18.754945: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.755659: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:18.755974: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:18.761655: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:18.762631: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:18.762973: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:18.766819: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:18.770287: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:18.773820: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:18.773928: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.774598: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.775168: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:18.780096: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:13:18.780260: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c9235fb480 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:18.780296: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:13:18.994111: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.994923: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c9235fb640 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:18.994958: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:13:18.995131: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.995699: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:18.995764: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:18.995793: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:18.995822: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:18.995847: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:18.995867: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:18.995885: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:18.995905: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:18.995978: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.996556: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.997067: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:18.997133: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:18.998344: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:18.998374: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:18.998387: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:18.998506: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.999109: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:18.999629: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:13:18.999673: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:13:19.605616 140644938663808 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:13:20.113714: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:20.114749: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:20.114877: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:20.114943: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:20.114987: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:20.115013: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:20.115038: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:20.115058: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:20.115078: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:20.115183: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:20.116070: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:20.116845: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:20.116915: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:20.116935: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:20.116960: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:20.117101: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:20.118040: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:20.118881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19/model.ckpt-400000\n",
"I1023 11:13:20.120193 140644938663808 saver.py:1284] Restoring parameters from /content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19/model.ckpt-400000\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:13:21.184858 140644938663808 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:13:21.185099 140644938663808 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 505 variables.\n",
"I1023 11:13:21.596608 140644938663808 graph_util_impl.py:334] Froze 505 variables.\n",
"INFO:tensorflow:Converted 505 variables to const ops.\n",
"I1023 11:13:21.656634 140644938663808 graph_util_impl.py:394] Converted 505 variables to const ops.\n",
"2021-10-23 11:13:21.766364: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "IV7d5kf9XFC-",
"outputId": "9d2ba9bb-cbdc-48dc-e598-89f24b700f23"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --output_file=\"/content/tflite_models/ssdlite_mobiledet_cpu_320x320_coco.tflite\" \\\n",
" --graph_def_file=\"/content/ssdlite_mobiledet_cpu_320x320_coco_2020_05_19/tflite/tflite_graph.pb\" \\\n",
" --inference_input_type=QUANTIZED_UINT8 \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,320,320,3 \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 32,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:13:24.438853: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:13:24.451454: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.452120: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:24.452428: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:24.453983: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:24.455055: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:24.455367: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:24.456948: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:24.457925: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:24.461349: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:24.461450: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.462013: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.462521: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:24.467191: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:13:24.467390: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55f280bf4d80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:24.467417: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:13:24.670176: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.670973: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55f280bf5800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:24.671008: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:13:24.671172: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.671788: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:24.671844: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:24.671867: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:24.671890: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:24.671916: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:24.671938: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:24.671958: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:24.671977: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:24.672048: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.672696: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.673260: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:24.673330: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:24.674292: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:24.674324: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:24.674337: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:24.674442: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.675014: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:24.675541: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:13:24.675583: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "Uy_QhOG7GNMe"
},
"source": [
"## ssdlite_mobiledet_edgetpu"
]
},
{
"cell_type": "code",
"metadata": {
"id": "HCPgCvgsE1qf",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "c1e9a7bc-b55e-453a-cb56-39107fc891a8"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19.tar.gz -P /content/\n",
"!tar xf /content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19.tar.gz -C /content/"
],
"execution_count": 33,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:13:27-- http://download.tensorflow.org/models/object_detection/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 156413934 (149M) [application/x-tar]\n",
"Saving to: ‘/content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19.tar.gz’\n",
"\n",
"ssdlite_mobiledet_e 100%[===================>] 149.17M 44.1MB/s in 3.4s \n",
"\n",
"2021-10-23 11:13:32 (44.1 MB/s) - ‘/content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19.tar.gz’ saved [156413934/156413934]\n",
"\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "THoSqChRYtvX"
},
"source": [
"Note: The pre-trained model does not include post processing. so, export from the model."
]
},
{
"cell_type": "code",
"metadata": {
"id": "dq0Qi9I5Gcv8",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "ebdc76d6-1ab1-4584-d1b3-30297d749a10"
},
"source": [
"!python3 object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19/uint8/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19/uint8/model.ckpt-400000\" \\\n",
" --output_directory=\"/content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19/uint8/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 34,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:13:37.332583 139811133814656 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:39.365406 139811133814656 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:39.433511 139811133814656 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:39.499949 139811133814656 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:39.568553 139811133814656 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:39.641684 139811133814656 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:13:39.710238 139811133814656 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"2021-10-23 11:13:39.791864: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:13:39.805251: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:39.805837: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:39.806133: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:39.811205: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:39.812182: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:39.812514: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:39.816354: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:39.820072: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:39.824066: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:39.824183: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:39.824798: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:39.825331: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:39.830707: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:13:39.830891: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x555c3b211800 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:39.830921: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:13:40.049456: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:40.050246: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x555c3b2119c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:40.050288: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:13:40.050464: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:40.050991: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:40.051063: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:40.051088: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:40.051116: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:40.051147: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:40.051168: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:40.051191: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:40.051214: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:40.051304: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:40.051902: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:40.052423: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:40.052494: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:40.053626: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:40.053651: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:40.053662: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:40.053779: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:40.054362: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:40.054873: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:13:40.054911: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/Conv/add_fold\n",
"I1023 11:13:41.969991 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/TuckerConv/Conv/add_fold\n",
"I1023 11:13:41.970307 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/TuckerConv/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/TuckerConv/Conv_1/add_fold\n",
"I1023 11:13:41.970499 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/TuckerConv/Conv_1/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv/Conv/add_fold\n",
"I1023 11:13:41.970754 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_1/Conv/add_fold\n",
"I1023 11:13:41.971013 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_1/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_2/Conv/add_fold\n",
"I1023 11:13:41.971256 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_2/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_3/Conv/add_fold\n",
"I1023 11:13:41.971515 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_3/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_4/Conv/add_fold\n",
"I1023 11:13:41.971774 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_4/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_5/Conv/add_fold\n",
"I1023 11:13:41.972025 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_5/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_6/Conv/add_fold\n",
"I1023 11:13:41.972273 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_6/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_7/Conv/add_fold\n",
"I1023 11:13:41.972526 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_7/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN/Conv/add_fold\n",
"I1023 11:13:41.972769 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN/SeparableConv2d/add_fold\n",
"I1023 11:13:41.972954 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_1/Conv/add_fold\n",
"I1023 11:13:41.973203 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_1/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_1/SeparableConv2d/add_fold\n",
"I1023 11:13:41.973380 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_1/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_8/Conv/add_fold\n",
"I1023 11:13:41.973620 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_8/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_9/Conv/add_fold\n",
"I1023 11:13:41.973865 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/FusedConv_9/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_2/Conv/add_fold\n",
"I1023 11:13:41.974103 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_2/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_2/SeparableConv2d/add_fold\n",
"I1023 11:13:41.974272 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_2/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_3/Conv/add_fold\n",
"I1023 11:13:41.974528 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_3/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_3/SeparableConv2d/add_fold\n",
"I1023 11:13:41.974695 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_3/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_4/Conv/add_fold\n",
"I1023 11:13:41.974941 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_4/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_4/SeparableConv2d/add_fold\n",
"I1023 11:13:41.975107 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_4/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_5/Conv/add_fold\n",
"I1023 11:13:41.975364 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_5/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_5/SeparableConv2d/add_fold\n",
"I1023 11:13:41.975536 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_5/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_6/Conv/add_fold\n",
"I1023 11:13:41.975779 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_6/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_6/SeparableConv2d/add_fold\n",
"I1023 11:13:41.975952 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_6/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_7/Conv/add_fold\n",
"I1023 11:13:41.976192 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_7/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_7/SeparableConv2d/add_fold\n",
"I1023 11:13:41.976369 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_7/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_8/Conv/add_fold\n",
"I1023 11:13:41.976606 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_8/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_8/SeparableConv2d/add_fold\n",
"I1023 11:13:41.976770 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_8/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_9/Conv/add_fold\n",
"I1023 11:13:41.977032 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_9/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_9/SeparableConv2d/add_fold\n",
"I1023 11:13:41.977198 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_9/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_10/Conv/add_fold\n",
"I1023 11:13:41.977444 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_10/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_10/SeparableConv2d/add_fold\n",
"I1023 11:13:41.977612 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/IBN_10/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_2_1x1_256/add_fold\n",
"I1023 11:13:41.977852 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_2_1x1_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_2_3x3_s2_512_depthwise/add_fold\n",
"I1023 11:13:41.978018 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_2_3x3_s2_512_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_2_3x3_s2_512/add_fold\n",
"I1023 11:13:41.978177 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_2_3x3_s2_512/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_3_1x1_128/add_fold\n",
"I1023 11:13:41.978348 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_3_1x1_128/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_3_3x3_s2_256_depthwise/add_fold\n",
"I1023 11:13:41.978525 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_3_3x3_s2_256_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_3_3x3_s2_256/add_fold\n",
"I1023 11:13:41.978692 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_3_3x3_s2_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_4_1x1_128/add_fold\n",
"I1023 11:13:41.978864 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_4_1x1_128/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_4_3x3_s2_256_depthwise/add_fold\n",
"I1023 11:13:41.979039 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_4_3x3_s2_256_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_4_3x3_s2_256/add_fold\n",
"I1023 11:13:41.979206 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_4_3x3_s2_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_5_1x1_64/add_fold\n",
"I1023 11:13:41.979378 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_1_Conv2d_5_1x1_64/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_5_3x3_s2_128_depthwise/add_fold\n",
"I1023 11:13:41.979551 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_5_3x3_s2_128_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_5_3x3_s2_128/add_fold\n",
"I1023 11:13:41.979723 139811133814656 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetEdgeTPU/C5_2_Conv2d_5_3x3_s2_128/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_0/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:13:41.979900 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_0/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_0/ClassPredictor_depthwise/add_fold\n",
"I1023 11:13:41.980075 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_0/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_1/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:13:41.980249 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_1/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_1/ClassPredictor_depthwise/add_fold\n",
"I1023 11:13:41.980434 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_1/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_2/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:13:41.980610 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_2/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_2/ClassPredictor_depthwise/add_fold\n",
"I1023 11:13:41.980781 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_2/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_3/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:13:41.980965 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_3/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_3/ClassPredictor_depthwise/add_fold\n",
"I1023 11:13:41.981140 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_3/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_4/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:13:41.981322 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_4/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_4/ClassPredictor_depthwise/add_fold\n",
"I1023 11:13:41.981497 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_4/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_5/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:13:41.981670 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_5/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_5/ClassPredictor_depthwise/add_fold\n",
"I1023 11:13:41.981853 139811133814656 quantize.py:299] Skipping quant after BoxPredictor_5/ClassPredictor_depthwise/add_fold\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:13:42.547372 139811133814656 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:13:43.359826: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:43.360436: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:43.360520: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:43.360544: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:43.360567: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:43.360588: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:43.360607: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:43.360626: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:43.360646: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:43.360731: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:43.361305: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:43.361801: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:43.361846: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:43.361860: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:43.361869: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:43.361968: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:43.362532: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:43.363045: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19/uint8/model.ckpt-400000\n",
"I1023 11:13:43.364010 139811133814656 saver.py:1284] Restoring parameters from /content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19/uint8/model.ckpt-400000\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:13:44.809442 139811133814656 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:13:44.809684 139811133814656 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 831 variables.\n",
"I1023 11:13:45.433054 139811133814656 graph_util_impl.py:334] Froze 831 variables.\n",
"INFO:tensorflow:Converted 831 variables to const ops.\n",
"I1023 11:13:45.518491 139811133814656 graph_util_impl.py:394] Converted 831 variables to const ops.\n",
"2021-10-23 11:13:45.661175: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "GpT6xX6bIAOa",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "208b619a-de81-4b9e-9018-2acdd2a7a198"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --output_file=\"/content/tflite_models/ssdlite_mobiledet_edgetpu_320x320_quant_coco.tflite\" \\\n",
" --graph_def_file=\"/content/ssdlite_mobiledet_edgetpu_320x320_coco_2020_05_19/uint8/tflite/tflite_graph.pb\" \\\n",
" --inference_type=QUANTIZED_UINT8 \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --input_shapes=1,320,320,3 \\\n",
" --change_concat_input_ranges=false \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 35,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:13:48.368421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:13:48.381210: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.381797: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:48.382042: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:48.383660: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:48.384767: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:48.385043: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:48.386646: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:48.387631: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:48.391129: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:48.391235: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.391830: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.392382: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:48.397489: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:13:48.397676: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55e8a0183100 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:48.397704: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:13:48.609533: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.610761: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55e8a01832c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:13:48.610811: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:13:48.611028: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.611875: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:13:48.611958: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:48.612006: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:13:48.612028: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:13:48.612047: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:13:48.612081: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:13:48.612102: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:13:48.612121: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:13:48.612210: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.612949: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.613529: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:13:48.613604: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:13:48.614567: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:13:48.614592: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:13:48.614603: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:13:48.614700: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.615242: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:13:48.615777: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:13:48.615820: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "TAmKPrivIUBA",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "594baf0a-cb52-4566-861b-15a84d83f283"
},
"source": [
"!edgetpu_compiler -s \\\n",
" -o /content/tflite_models/ \\\n",
" /content/tflite_models/ssdlite_mobiledet_edgetpu_320x320_quant_coco.tflite"
],
"execution_count": 36,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Edge TPU Compiler version 16.0.384591198\n",
"Started a compilation timeout timer of 180 seconds.\n",
"\n",
"Model compiled successfully in 1102 ms.\n",
"\n",
"Input model: /content/tflite_models/ssdlite_mobiledet_edgetpu_320x320_quant_coco.tflite\n",
"Input size: 4.08MiB\n",
"Output model: /content/tflite_models/ssdlite_mobiledet_edgetpu_320x320_quant_coco_edgetpu.tflite\n",
"Output size: 5.12MiB\n",
"On-chip memory used for caching model parameters: 4.89MiB\n",
"On-chip memory remaining for caching model parameters: 2.61MiB\n",
"Off-chip memory used for streaming uncached model parameters: 0.00B\n",
"Number of Edge TPU subgraphs: 1\n",
"Total number of operations: 125\n",
"Operation log: /content/tflite_models/ssdlite_mobiledet_edgetpu_320x320_quant_coco_edgetpu.log\n",
"\n",
"Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.\n",
"Number of operations that will run on Edge TPU: 124\n",
"Number of operations that will run on CPU: 1\n",
"\n",
"Operator Count Status\n",
"\n",
"CONCATENATION 2 Mapped to Edge TPU\n",
"RESHAPE 13 Mapped to Edge TPU\n",
"LOGISTIC 1 Mapped to Edge TPU\n",
"DEPTHWISE_CONV_2D 27 Mapped to Edge TPU\n",
"CONV_2D 66 Mapped to Edge TPU\n",
"CUSTOM 1 Operation is working on an unsupported data type\n",
"ADD 15 Mapped to Edge TPU\n",
"Compilation child process completed within timeout period.\n",
"Compilation succeeded! \n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "dk02EkLAv_30"
},
"source": [
"## ssd_mobiledet_dsp_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "-WL5zENmwDPL",
"outputId": "db4fb114-74c2-49ce-ba88-3d2781d5fed3",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19.tar.gz -P /content/\n",
"!tar xf /content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19.tar.gz -C /content/"
],
"execution_count": 37,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:13:52-- http://download.tensorflow.org/models/object_detection/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c01::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 265201340 (253M) [application/x-tar]\n",
"Saving to: ‘/content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19.tar.gz’\n",
"\n",
"ssdlite_mobiledet_d 100%[===================>] 252.92M 74.0MB/s in 3.4s \n",
"\n",
"2021-10-23 11:13:56 (74.0 MB/s) - ‘/content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19.tar.gz’ saved [265201340/265201340]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "0WMLUVeDwNp8",
"outputId": "8795b2b3-44c2-4f48-89d7-afbb61641e31",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"source": [
"!python3 object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19/uint8/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19/uint8/model.ckpt-400000\" \\\n",
" --output_directory=\"/content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19/uint8/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 38,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:14:03.752260 140419974727552 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:05.896516 140419974727552 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:05.967854 140419974727552 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:06.046400 140419974727552 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:06.116310 140419974727552 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:06.187589 140419974727552 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:06.256446 140419974727552 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"2021-10-23 11:14:06.335553: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:14:06.351511: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.352388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:06.352728: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:06.354570: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:06.355549: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:06.355838: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:06.357766: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:06.358667: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:06.362430: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:06.362539: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.363104: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.363641: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:06.372172: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:14:06.372363: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560ab840f800 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:06.372390: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:14:06.601977: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.602830: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560ab840f9c0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:06.602861: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:14:06.603033: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.603607: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:06.603675: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:06.603704: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:06.603727: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:06.603751: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:06.603770: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:06.603790: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:06.603810: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:06.603884: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.604674: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.605429: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:06.605519: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:06.606737: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:06.606765: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:06.606777: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:06.606897: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.607489: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:06.608000: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:14:06.608037: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/Conv/add_fold\n",
"I1023 11:14:08.526568 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBNNoExpansion/SeparableConv2d/add_fold\n",
"I1023 11:14:08.526875 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBNNoExpansion/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv/Conv/add_fold\n",
"I1023 11:14:08.527139 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_1/Conv/add_fold\n",
"I1023 11:14:08.527396 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_1/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN/Conv/add_fold\n",
"I1023 11:14:08.527640 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN/SeparableConv2d/add_fold\n",
"I1023 11:14:08.527810 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv/Conv/add_fold\n",
"I1023 11:14:08.528062 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv/Conv_1/add_fold\n",
"I1023 11:14:08.528221 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv/Conv_1/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_2/Conv/add_fold\n",
"I1023 11:14:08.528464 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_2/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_1/Conv/add_fold\n",
"I1023 11:14:08.528700 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_1/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_1/SeparableConv2d/add_fold\n",
"I1023 11:14:08.528873 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_1/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_3/Conv/add_fold\n",
"I1023 11:14:08.529114 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_3/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_4/Conv/add_fold\n",
"I1023 11:14:08.529356 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_4/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_5/Conv/add_fold\n",
"I1023 11:14:08.529588 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_5/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_2/Conv/add_fold\n",
"I1023 11:14:08.529832 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_2/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_2/SeparableConv2d/add_fold\n",
"I1023 11:14:08.529997 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_2/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_3/Conv/add_fold\n",
"I1023 11:14:08.530231 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_3/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_3/SeparableConv2d/add_fold\n",
"I1023 11:14:08.530410 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_3/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_4/Conv/add_fold\n",
"I1023 11:14:08.530651 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_4/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_4/SeparableConv2d/add_fold\n",
"I1023 11:14:08.530824 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_4/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_6/Conv/add_fold\n",
"I1023 11:14:08.531059 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_6/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_5/Conv/add_fold\n",
"I1023 11:14:08.531303 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_5/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_5/SeparableConv2d/add_fold\n",
"I1023 11:14:08.531469 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_5/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_6/Conv/add_fold\n",
"I1023 11:14:08.531713 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_6/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_6/SeparableConv2d/add_fold\n",
"I1023 11:14:08.531887 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_6/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_7/Conv/add_fold\n",
"I1023 11:14:08.532125 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_7/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_7/SeparableConv2d/add_fold\n",
"I1023 11:14:08.532302 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_7/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_8/Conv/add_fold\n",
"I1023 11:14:08.532538 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_8/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_8/SeparableConv2d/add_fold\n",
"I1023 11:14:08.532699 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_8/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_9/Conv/add_fold\n",
"I1023 11:14:08.532940 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_9/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_9/SeparableConv2d/add_fold\n",
"I1023 11:14:08.533105 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_9/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_7/Conv/add_fold\n",
"I1023 11:14:08.533352 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/FusedConv_7/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv_1/Conv/add_fold\n",
"I1023 11:14:08.533590 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv_1/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv_1/Conv_1/add_fold\n",
"I1023 11:14:08.533753 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/TuckerConv_1/Conv_1/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_10/Conv/add_fold\n",
"I1023 11:14:08.534002 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_10/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/IBN_10/SeparableConv2d/add_fold\n",
"I1023 11:14:08.534175 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/IBN_10/SeparableConv2d/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_2_1x1_256/add_fold\n",
"I1023 11:14:08.534424 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_2_1x1_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_2_3x3_s2_512_depthwise/add_fold\n",
"I1023 11:14:08.534591 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_2_3x3_s2_512_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_2_3x3_s2_512/add_fold\n",
"I1023 11:14:08.534751 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_2_3x3_s2_512/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_3_1x1_128/add_fold\n",
"I1023 11:14:08.534916 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_3_1x1_128/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_3_3x3_s2_256_depthwise/add_fold\n",
"I1023 11:14:08.535092 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_3_3x3_s2_256_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_3_3x3_s2_256/add_fold\n",
"I1023 11:14:08.535263 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_3_3x3_s2_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_4_1x1_128/add_fold\n",
"I1023 11:14:08.535441 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_4_1x1_128/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_4_3x3_s2_256_depthwise/add_fold\n",
"I1023 11:14:08.535616 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_4_3x3_s2_256_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_4_3x3_s2_256/add_fold\n",
"I1023 11:14:08.535782 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_4_3x3_s2_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_5_1x1_64/add_fold\n",
"I1023 11:14:08.535952 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_1_Conv2d_5_1x1_64/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_5_3x3_s2_128_depthwise/add_fold\n",
"I1023 11:14:08.536127 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_5_3x3_s2_128_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_5_3x3_s2_128/add_fold\n",
"I1023 11:14:08.536303 140419974727552 quantize.py:299] Skipping quant after FeatureExtractor/MobileDetDSP/C5_2_Conv2d_5_3x3_s2_128/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_0/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:08.536478 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_0/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_0/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:08.536652 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_0/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_1/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:08.536832 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_1/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_1/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:08.537008 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_1/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_2/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:08.537186 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_2/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_2/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:08.537364 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_2/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_3/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:08.537537 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_3/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_3/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:08.537710 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_3/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_4/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:08.537886 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_4/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_4/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:08.538062 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_4/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_5/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:08.538232 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_5/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_5/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:08.538413 140419974727552 quantize.py:299] Skipping quant after BoxPredictor_5/ClassPredictor_depthwise/add_fold\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:14:09.130135 140419974727552 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:14:09.945648: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:09.946241: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:09.946346: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:09.946375: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:09.946397: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:09.946417: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:09.946437: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:09.946456: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:09.946477: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:09.946563: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:09.947135: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:09.947641: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:09.947682: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:09.947696: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:09.947705: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:09.947800: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:09.948365: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:09.948882: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19/uint8/model.ckpt-400000\n",
"I1023 11:14:09.950072 140419974727552 saver.py:1284] Restoring parameters from /content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19/uint8/model.ckpt-400000\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:14:11.485623 140419974727552 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:14:11.485888 140419974727552 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 840 variables.\n",
"I1023 11:14:12.137032 140419974727552 graph_util_impl.py:334] Froze 840 variables.\n",
"INFO:tensorflow:Converted 840 variables to const ops.\n",
"I1023 11:14:12.232347 140419974727552 graph_util_impl.py:394] Converted 840 variables to const ops.\n",
"2021-10-23 11:14:12.399699: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "eYtmhyLi0hxp",
"outputId": "4f41533d-f07f-4016-d5f1-9db6e1ebca8f",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --output_file=\"/content/tflite_models/ssdlite_mobiledet_dsp_320x320_quant_coco.tflite\" \\\n",
" --graph_def_file=\"/content/ssdlite_mobiledet_dsp_320x320_coco_2020_05_19/uint8/tflite/tflite_graph.pb\" \\\n",
" --inference_type=QUANTIZED_UINT8 \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --input_shapes=1,320,320,3 \\\n",
" --change_concat_input_ranges=false \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 39,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:14:15.452348: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:14:15.465377: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.465936: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:15.466185: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:15.467697: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:15.468782: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:15.469055: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:15.470633: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:15.471608: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:15.475039: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:15.475147: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.475730: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.476229: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:15.480968: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:14:15.481150: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560f70f00d80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:15.481177: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:14:15.703830: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.704692: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x560f70f01800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:15.704721: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:14:15.704891: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.705445: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:15.705503: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:15.705524: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:15.705542: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:15.705560: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:15.705577: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:15.705594: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:15.705611: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:15.705675: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.706214: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.706723: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:15.706788: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:15.707740: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:15.707765: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:15.707782: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:15.707894: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.708473: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:15.708989: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:14:15.709028: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "uiLWTB0z9Tve",
"outputId": "a2a55765-b843-482a-92b8-73f2af6f93ab",
"colab": {
"base_uri": "https://localhost:8080/"
}
},
"source": [
"!edgetpu_compiler -s \\\n",
" -o /content/tflite_models/ \\\n",
" /content/tflite_models/ssdlite_mobiledet_dsp_320x320_quant_coco.tflite"
],
"execution_count": 54,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Edge TPU Compiler version 16.0.384591198\n",
"Started a compilation timeout timer of 180 seconds.\n",
"\n",
"Model compiled successfully in 1207 ms.\n",
"\n",
"Input model: /content/tflite_models/ssdlite_mobiledet_dsp_320x320_quant_coco.tflite\n",
"Input size: 6.91MiB\n",
"Output model: /content/tflite_models/ssdlite_mobiledet_dsp_320x320_quant_coco_edgetpu.tflite\n",
"Output size: 7.86MiB\n",
"On-chip memory used for caching model parameters: 7.43MiB\n",
"On-chip memory remaining for caching model parameters: 0.00B\n",
"Off-chip memory used for streaming uncached model parameters: 134.44KiB\n",
"Number of Edge TPU subgraphs: 1\n",
"Total number of operations: 126\n",
"Operation log: /content/tflite_models/ssdlite_mobiledet_dsp_320x320_quant_coco_edgetpu.log\n",
"\n",
"Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.\n",
"Number of operations that will run on Edge TPU: 125\n",
"Number of operations that will run on CPU: 1\n",
"\n",
"Operator Count Status\n",
"\n",
"DEPTHWISE_CONV_2D 28 Mapped to Edge TPU\n",
"LOGISTIC 1 Mapped to Edge TPU\n",
"CONV_2D 66 Mapped to Edge TPU\n",
"RESHAPE 13 Mapped to Edge TPU\n",
"CONCATENATION 2 Mapped to Edge TPU\n",
"CUSTOM 1 Operation is working on an unsupported data type\n",
"ADD 15 Mapped to Edge TPU\n",
"Compilation child process completed within timeout period.\n",
"Compilation succeeded! \n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "lfeXTix1_xn0"
},
"source": [
"## ssd_mobilenet_edgetpu_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "8GLaRB4QIk5B",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "fd71862a-81cd-4df0-942f-451ca95fae26"
},
"source": [
"!gdown --id 1IWFdKHFXOIhB6TTaAqd37GPmiZuFg3RG\n",
"!mv checkpoints_ssdlite_mobilenet_edgetpu_coco_quant.tar.gz /content/\n",
"!tar xf /content/checkpoints_ssdlite_mobilenet_edgetpu_coco_quant.tar.gz -C /content/"
],
"execution_count": 40,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Downloading...\n",
"From: https://drive.google.com/uc?id=1IWFdKHFXOIhB6TTaAqd37GPmiZuFg3RG\n",
"To: /content/models/research/checkpoints_ssdlite_mobilenet_edgetpu_coco_quant.tar.gz\n",
"100% 75.7M/75.7M [00:00<00:00, 78.4MB/s]\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "_Z3A6LwpL4bd",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "2135d274-3c04-45d3-83a4-4b7a79a98ebd"
},
"source": [
"!python3 object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssdlite_mobilenet_edgetpu_coco_quant/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssdlite_mobilenet_edgetpu_coco_quant/model.ckpt\" \\\n",
" --output_directory=\"/content/ssdlite_mobilenet_edgetpu_coco_quant/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 41,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:14:26.342060 139804409665408 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:28.435709 139804409665408 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:28.504227 139804409665408 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:28.572099 139804409665408 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:28.641326 139804409665408 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:28.712712 139804409665408 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"INFO:tensorflow:depth of additional conv before box predictor: 0\n",
"I1023 11:14:28.781512 139804409665408 convolutional_box_predictor.py:156] depth of additional conv before box predictor: 0\n",
"2021-10-23 11:14:28.866452: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:14:28.880230: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:28.880797: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:28.881069: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:28.882724: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:28.883630: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:28.883943: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:28.885625: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:28.886521: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:28.889972: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:28.890085: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:28.890700: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:28.891236: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:28.896153: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:14:28.896380: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5628ec351480 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:28.896412: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:14:29.109484: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:29.110270: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5628ec351640 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:29.110343: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:14:29.110523: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:29.111082: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:29.111173: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:29.111214: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:29.111237: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:29.111262: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:29.111293: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:29.111327: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:29.111351: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:29.111447: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:29.112304: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:29.112891: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:29.112968: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:29.114108: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:29.114135: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:29.114146: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:29.114253: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:29.114828: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:29.115377: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:14:29.115416: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/Conv/add_fold\n",
"I1023 11:14:31.047488 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/Conv/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_1/expand/add_fold\n",
"I1023 11:14:31.047878 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_1/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_2/expand/add_fold\n",
"I1023 11:14:31.048151 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_2/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_3/expand/add_fold\n",
"I1023 11:14:31.048410 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_3/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_4/expand/add_fold\n",
"I1023 11:14:31.048663 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_4/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_5/expand/add_fold\n",
"I1023 11:14:31.048913 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_5/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_6/expand/add_fold\n",
"I1023 11:14:31.049154 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_6/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_7/expand/add_fold\n",
"I1023 11:14:31.049401 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_7/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_8/expand/add_fold\n",
"I1023 11:14:31.049639 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_8/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_9/expand/add_fold\n",
"I1023 11:14:31.049887 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_9/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_9/depthwise/add_fold\n",
"I1023 11:14:31.050055 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_9/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_10/expand/add_fold\n",
"I1023 11:14:31.050298 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_10/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_10/depthwise/add_fold\n",
"I1023 11:14:31.050470 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_10/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_11/expand/add_fold\n",
"I1023 11:14:31.050712 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_11/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_11/depthwise/add_fold\n",
"I1023 11:14:31.050888 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_11/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_12/expand/add_fold\n",
"I1023 11:14:31.051134 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_12/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_12/depthwise/add_fold\n",
"I1023 11:14:31.051314 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_12/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_13/expand/add_fold\n",
"I1023 11:14:31.051577 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_13/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_13/depthwise/add_fold\n",
"I1023 11:14:31.051752 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_13/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_14/expand/add_fold\n",
"I1023 11:14:31.052001 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_14/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_14/depthwise/add_fold\n",
"I1023 11:14:31.052172 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_14/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_15/expand/add_fold\n",
"I1023 11:14:31.052427 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_15/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_15/depthwise/add_fold\n",
"I1023 11:14:31.052600 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_15/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_16/expand/add_fold\n",
"I1023 11:14:31.052857 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_16/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_16/depthwise/add_fold\n",
"I1023 11:14:31.053030 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_16/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_17/expand/add_fold\n",
"I1023 11:14:31.053273 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_17/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_17/depthwise/add_fold\n",
"I1023 11:14:31.053458 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_17/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_18/expand/add_fold\n",
"I1023 11:14:31.053700 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_18/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_18/depthwise/add_fold\n",
"I1023 11:14:31.053874 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_18/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_19/expand/add_fold\n",
"I1023 11:14:31.054117 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_19/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_19/depthwise/add_fold\n",
"I1023 11:14:31.054297 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_19/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_20/expand/add_fold\n",
"I1023 11:14:31.054543 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_20/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_20/depthwise/add_fold\n",
"I1023 11:14:31.054713 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_20/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_21/expand/add_fold\n",
"I1023 11:14:31.054961 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_21/expand/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_21/depthwise/add_fold\n",
"I1023 11:14:31.055132 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/expanded_conv_21/depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_2_1x1_256/add_fold\n",
"I1023 11:14:31.055386 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_2_1x1_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_2_3x3_s2_512_depthwise/add_fold\n",
"I1023 11:14:31.055557 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_2_3x3_s2_512_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_2_3x3_s2_512/add_fold\n",
"I1023 11:14:31.055721 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_2_3x3_s2_512/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_3_1x1_128/add_fold\n",
"I1023 11:14:31.055890 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_3_1x1_128/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_3_3x3_s2_256_depthwise/add_fold\n",
"I1023 11:14:31.056067 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_3_3x3_s2_256_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_3_3x3_s2_256/add_fold\n",
"I1023 11:14:31.056238 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_3_3x3_s2_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_4_1x1_128/add_fold\n",
"I1023 11:14:31.056425 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_4_1x1_128/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_4_3x3_s2_256_depthwise/add_fold\n",
"I1023 11:14:31.056604 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_4_3x3_s2_256_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_4_3x3_s2_256/add_fold\n",
"I1023 11:14:31.056776 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_4_3x3_s2_256/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_5_1x1_64/add_fold\n",
"I1023 11:14:31.056960 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_1_Conv2d_5_1x1_64/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_5_3x3_s2_128_depthwise/add_fold\n",
"I1023 11:14:31.057137 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_5_3x3_s2_128_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_5_3x3_s2_128/add_fold\n",
"I1023 11:14:31.057317 139804409665408 quantize.py:299] Skipping quant after FeatureExtractor/MobilenetEdgeTPU/layer_23_2_Conv2d_5_3x3_s2_128/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_0/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:31.057501 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_0/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_0/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:31.057687 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_0/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_1/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:31.057870 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_1/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_1/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:31.058047 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_1/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_2/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:31.058223 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_2/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_2/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:31.058408 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_2/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_3/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:31.058587 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_3/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_3/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:31.058764 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_3/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_4/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:31.058947 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_4/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_4/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:31.059122 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_4/ClassPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_5/BoxEncodingPredictor_depthwise/add_fold\n",
"I1023 11:14:31.059306 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_5/BoxEncodingPredictor_depthwise/add_fold\n",
"INFO:tensorflow:Skipping quant after BoxPredictor_5/ClassPredictor_depthwise/add_fold\n",
"I1023 11:14:31.059482 139804409665408 quantize.py:299] Skipping quant after BoxPredictor_5/ClassPredictor_depthwise/add_fold\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:14:31.640517 139804409665408 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:14:32.458850: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:32.459460: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:32.459542: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:32.459567: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:32.459590: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:32.459610: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:32.459630: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:32.459650: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:32.459670: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:32.459754: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:32.460321: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:32.460814: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:32.460857: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:32.460871: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:32.460881: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:32.460966: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:32.461519: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:32.462036: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssdlite_mobilenet_edgetpu_coco_quant/model.ckpt\n",
"I1023 11:14:32.463109 139804409665408 saver.py:1284] Restoring parameters from /content/ssdlite_mobilenet_edgetpu_coco_quant/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:14:33.955960 139804409665408 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:14:33.956212 139804409665408 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 831 variables.\n",
"I1023 11:14:34.601497 139804409665408 graph_util_impl.py:334] Froze 831 variables.\n",
"INFO:tensorflow:Converted 831 variables to const ops.\n",
"I1023 11:14:34.688683 139804409665408 graph_util_impl.py:394] Converted 831 variables to const ops.\n",
"2021-10-23 11:14:34.833782: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "CRuTN1M3dxmU",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "96ac1248-24f8-4e6a-eae5-e4bb1297f6c6"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --output_file=\"/content/tflite_models/ssdlite_mobilenet_edgetpu_coco_quant.tflite\" \\\n",
" --graph_def_file=\"/content/ssdlite_mobilenet_edgetpu_coco_quant/tflite/tflite_graph.pb\" \\\n",
" --inference_type=QUANTIZED_UINT8 \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --input_shapes=1,320,320,3 \\\n",
" --change_concat_input_ranges=false \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 42,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:14:37.455313: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:14:37.468169: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.468754: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:37.469016: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:37.470515: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:37.471587: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:37.471859: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:37.473414: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:37.474364: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:37.477698: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:37.477803: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.478381: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.478885: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:37.483554: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:14:37.483735: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ddf9edad80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:37.483761: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:14:37.694170: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.694986: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ddf9edb800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:37.695021: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:14:37.695184: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.695751: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:37.695806: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:37.695826: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:37.695846: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:37.695866: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:37.695884: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:37.695900: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:37.695917: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:37.695982: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.696558: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.697060: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:37.697120: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:37.698183: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:37.698222: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:37.698237: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:37.698388: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.699188: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:37.699960: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:14:37.700022: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "6PaBEjIUd9y6",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "2b62de68-849d-4ddc-da19-466fd8ad1510"
},
"source": [
"!edgetpu_compiler -s \\\n",
" -o /content/tflite_models/ \\\n",
" /content/tflite_models/ssdlite_mobilenet_edgetpu_coco_quant.tflite"
],
"execution_count": 43,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Edge TPU Compiler version 16.0.384591198\n",
"Started a compilation timeout timer of 180 seconds.\n",
"\n",
"Model compiled successfully in 1066 ms.\n",
"\n",
"Input model: /content/tflite_models/ssdlite_mobilenet_edgetpu_coco_quant.tflite\n",
"Input size: 3.81MiB\n",
"Output model: /content/tflite_models/ssdlite_mobilenet_edgetpu_coco_quant_edgetpu.tflite\n",
"Output size: 4.72MiB\n",
"On-chip memory used for caching model parameters: 4.49MiB\n",
"On-chip memory remaining for caching model parameters: 2.93MiB\n",
"Off-chip memory used for streaming uncached model parameters: 0.00B\n",
"Number of Edge TPU subgraphs: 1\n",
"Total number of operations: 125\n",
"Operation log: /content/tflite_models/ssdlite_mobilenet_edgetpu_coco_quant_edgetpu.log\n",
"\n",
"Model successfully compiled but not all operations are supported by the Edge TPU. A percentage of the model will instead run on the CPU, which is slower. If possible, consider updating your model to use only operations supported by the Edge TPU. For details, visit g.co/coral/model-reqs.\n",
"Number of operations that will run on Edge TPU: 124\n",
"Number of operations that will run on CPU: 1\n",
"\n",
"Operator Count Status\n",
"\n",
"CONV_2D 64 Mapped to Edge TPU\n",
"DEPTHWISE_CONV_2D 29 Mapped to Edge TPU\n",
"LOGISTIC 1 Mapped to Edge TPU\n",
"CONCATENATION 2 Mapped to Edge TPU\n",
"RESHAPE 13 Mapped to Edge TPU\n",
"CUSTOM 1 Operation is working on an unsupported data type\n",
"ADD 15 Mapped to Edge TPU\n",
"Compilation child process completed within timeout period.\n",
"Compilation succeeded! \n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "uDHjXu_BZ524"
},
"source": [
"## ssd_mobilenet_v1_fpn_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "qRSaJ_87aMgj",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "e265549a-7270-4356-cf47-95380396e08a"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz -P /content/\n",
"!tar xf /content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz -C /content/"
],
"execution_count": 44,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:14:42-- http://download.tensorflow.org/models/object_detection/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 74.125.23.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|74.125.23.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 135664441 (129M) [application/x-tar]\n",
"Saving to: ‘/content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz’\n",
"\n",
"ssd_mobilenet_v1_fp 100%[===================>] 129.38M 52.4MB/s in 2.5s \n",
"\n",
"2021-10-23 11:14:45 (52.4 MB/s) - ‘/content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz’ saved [135664441/135664441]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "eMkByPv5anWM",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "88e641f1-eaf0-4e77-b3aa-b8b7278d1182"
},
"source": [
"!python object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/model.ckpt\" \\\n",
" --output_directory=\"/content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 45,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:14:49.486407 140157692540800 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"2021-10-23 11:14:51.725744: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:14:51.739217: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.739818: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:51.740097: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:51.741626: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:51.742754: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:51.743052: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:51.744901: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:51.745935: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:51.749495: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:51.749605: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.750180: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.750690: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:51.755668: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:14:51.755843: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c1ec01f480 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:51.755870: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:14:51.979013: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.979844: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c1ec01f800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:51.979876: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:14:51.980054: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.980635: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:51.980704: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:51.980729: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:51.980752: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:51.980772: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:51.980791: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:51.980810: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:51.980836: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:51.980911: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.981500: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.982002: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:51.982071: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:51.983195: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:51.983222: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:51.983235: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:51.983370: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.983939: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:51.984468: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:14:51.984507: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:14:52.373664 140157692540800 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:14:52.871338: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:52.871968: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:52.872057: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:52.872091: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:52.872120: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:52.872148: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:52.872175: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:52.872198: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:52.872222: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:52.872342: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:52.872938: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:52.873463: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:52.873507: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:52.873523: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:52.873537: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:52.873645: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:52.874222: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:52.874759: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/model.ckpt\n",
"I1023 11:14:52.875836 140157692540800 saver.py:1284] Restoring parameters from /content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:14:53.731502 140157692540800 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:14:53.731782 140157692540800 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 333 variables.\n",
"I1023 11:14:54.012014 140157692540800 graph_util_impl.py:334] Froze 333 variables.\n",
"INFO:tensorflow:Converted 333 variables to const ops.\n",
"I1023 11:14:54.098806 140157692540800 graph_util_impl.py:394] Converted 333 variables to const ops.\n",
"2021-10-23 11:14:54.243378: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "3jH665jGar_L",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "0115ca75-8bce-4faa-888b-bb89a6de53ce"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco.tflite\" \\\n",
" --inference_input_type=QUANTIZED_UINT8 \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,640,640,3 \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 46,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:14:57.739992: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:14:57.752792: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.753368: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:57.753623: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:57.755135: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:57.756195: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:57.756495: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:57.758064: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:57.760037: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:57.763504: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:57.763606: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.764172: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.764682: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:57.769467: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:14:57.769651: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x557d848dad80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:57.769678: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:14:57.994795: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.995633: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x557d848db800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:14:57.995668: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:14:57.995854: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.996448: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:14:57.996510: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:57.996533: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:14:57.996555: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:14:57.996576: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:14:57.996597: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:14:57.996618: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:14:57.996639: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:14:57.996713: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.997319: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.997852: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:14:57.997925: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:14:57.998899: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:14:57.998929: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:14:57.998945: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:14:57.999060: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:57.999693: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:14:58.000354: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:14:58.000415: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "VvO3F_gLa8n6",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "e8b1d825-3bf9-4404-cfa6-4bce5b7f054d"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssd_mobilenet_v1_fpn_shared_box_predictor_640x640_coco_fp16.tflite\" \\\n",
" --inference_input_type=FLOAT \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,640,640,3 \\\n",
" --quantize_to_float16 \\\n",
" --post_training_quantize \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 47,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:15:02.898892: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:15:02.911878: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:02.912468: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:02.912729: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:02.914244: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:02.915380: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:02.915656: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:02.917261: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:02.918354: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:02.924275: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:02.924396: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:02.924973: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:02.925543: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:02.930321: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:15:02.930517: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ff235c2d80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:02.930544: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:15:03.150174: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:03.150977: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55ff235c3800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:03.151009: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:15:03.151168: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:03.151745: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:03.151801: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:03.151829: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:03.151849: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:03.151867: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:03.151886: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:03.151904: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:03.151922: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:03.151985: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:03.152551: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:03.153049: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:03.153111: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:03.154064: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:15:03.154107: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:15:03.154118: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:15:03.154226: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:03.154836: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:03.155383: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:15:03.155425: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "R2mS4wMYbPn4"
},
"source": [
"## ssd_resnet_50_fpn_coco"
]
},
{
"cell_type": "code",
"metadata": {
"id": "igdKIzU9bWV8",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "e915f33f-ab52-42ec-8e32-af65a447a3cd"
},
"source": [
"!wget http://download.tensorflow.org/models/object_detection/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz -P /content/\n",
"!tar xf /content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz -C /content/"
],
"execution_count": 48,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2021-10-23 11:15:06-- http://download.tensorflow.org/models/object_detection/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz\n",
"Resolving download.tensorflow.org (download.tensorflow.org)... 142.250.157.128, 2404:6800:4008:c02::80\n",
"Connecting to download.tensorflow.org (download.tensorflow.org)|142.250.157.128|:80... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 366947246 (350M) [application/x-tar]\n",
"Saving to: ‘/content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz’\n",
"\n",
"ssd_resnet50_v1_fpn 100%[===================>] 349.95M 80.2MB/s in 5.2s \n",
"\n",
"2021-10-23 11:15:12 (67.2 MB/s) - ‘/content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03.tar.gz’ saved [366947246/366947246]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "r1eIhf1Obp3b",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "0749ad9a-88b8-452f-a04d-89af36e9b1c8"
},
"source": [
"!python object_detection/export_tflite_ssd_graph.py \\\n",
" --pipeline_config_path=\"/content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/pipeline.config\" \\\n",
" --trained_checkpoint_prefix=\"/content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/model.ckpt\" \\\n",
" --output_directory=\"/content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/tflite\" \\\n",
" --add_postprocessing_op=true"
],
"execution_count": 49,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"W1023 11:15:19.437806 140010586830720 deprecation.py:323] From /usr/local/lib/python3.7/dist-packages/tf_slim/layers/layers.py:1089: Layer.apply (from tensorflow.python.keras.engine.base_layer) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Please use `layer.__call__` method instead.\n",
"2021-10-23 11:15:22.327473: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:15:22.341853: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.342431: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:22.342703: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:22.344429: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:22.345372: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:22.345660: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:22.347388: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:22.348633: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:22.352416: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:22.352521: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.353099: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.353620: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:22.358436: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:15:22.358604: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c3afc95480 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:22.358631: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:15:22.582407: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.583198: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55c3afc95800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:22.583232: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:15:22.583434: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.583973: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:22.584037: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:22.584060: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:22.584083: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:22.584103: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:22.584123: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:22.584142: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:22.584162: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:22.584241: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.584821: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.585331: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:22.585398: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:22.586534: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:15:22.586560: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:15:22.586571: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:15:22.586687: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.587256: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:22.587777: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:15:22.587820: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"W1023 11:15:23.195298 140010586830720 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:127: checkpoint_exists (from tensorflow.python.training.checkpoint_management) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use standard file APIs to check for files with this prefix.\n",
"2021-10-23 11:15:23.649682: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:23.650268: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:23.650374: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:23.650404: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:23.650430: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:23.650455: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:23.650476: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:23.650498: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:23.650521: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:23.650611: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:23.651202: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:23.651740: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:23.651782: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:15:23.651796: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:15:23.651806: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:15:23.651902: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:23.652471: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:23.653002: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n",
"INFO:tensorflow:Restoring parameters from /content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/model.ckpt\n",
"I1023 11:15:23.654122 140010586830720 saver.py:1284] Restoring parameters from /content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/model.ckpt\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"W1023 11:15:24.841451 140010586830720 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/tools/freeze_graph.py:233: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.convert_variables_to_constants`\n",
"WARNING:tensorflow:From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"W1023 11:15:24.841683 140010586830720 deprecation.py:323] From /tensorflow-1.15.2/python3.7/tensorflow_core/python/framework/graph_util_impl.py:277: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use `tf.compat.v1.graph_util.extract_sub_graph`\n",
"INFO:tensorflow:Froze 463 variables.\n",
"I1023 11:15:25.225488 140010586830720 graph_util_impl.py:334] Froze 463 variables.\n",
"INFO:tensorflow:Converted 463 variables to const ops.\n",
"I1023 11:15:25.397957 140010586830720 graph_util_impl.py:394] Converted 463 variables to const ops.\n",
"2021-10-23 11:15:25.709536: I tensorflow/tools/graph_transforms/transform_graph.cc:317] Applying strip_unused_nodes\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "KLMnIhvSbyHW",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "4a4f2dd5-2b9b-4f2f-bc01-0ca9561cc471"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco.tflite\" \\\n",
" --inference_input_type=QUANTIZED_UINT8 \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,640,640,3 \\\n",
" --mean_values=128 \\\n",
" --std_dev_values=128 \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 50,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:15:32.181584: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:15:32.195019: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.195611: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:32.195961: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:32.197552: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:32.198729: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:32.199117: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:32.200834: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:32.201879: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:32.205536: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:32.205637: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.206387: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.206901: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:32.211755: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:15:32.211991: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56537639ed80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:32.212019: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:15:32.434207: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.435095: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x56537639f800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:32.435126: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:15:32.435317: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.435861: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:32.435918: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:32.435940: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:32.435959: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:32.435978: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:32.435996: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:32.436013: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:32.436031: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:32.436096: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.436684: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.437185: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:32.437251: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:32.438197: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:15:32.438222: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:15:32.438233: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:15:32.438356: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.438914: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:32.439444: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:15:32.439487: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "_ZLbEI37cE5I",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "f0979951-fb94-4854-b61a-2a9e9667cd2e"
},
"source": [
"!tflite_convert \\\n",
" --enable_v1_converter \\\n",
" --graph_def_file=\"/content/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco14_sync_2018_07_03/tflite/tflite_graph.pb\" \\\n",
" --output_file=\"/content/tflite_models/ssd_resnet50_v1_fpn_shared_box_predictor_640x640_coco_fp16.tflite\" \\\n",
" --inference_input_type=FLOAT \\\n",
" --inference_type=FLOAT \\\n",
" --input_arrays=\"normalized_input_image_tensor\" \\\n",
" --output_arrays=\"TFLite_Detection_PostProcess,TFLite_Detection_PostProcess:1,TFLite_Detection_PostProcess:2,TFLite_Detection_PostProcess:3\" \\\n",
" --input_shapes=1,640,640,3 \\\n",
" --quantize_to_float16 \\\n",
" --post_training_quantize \\\n",
" --allow_nudging_weights_to_use_fast_gemm_kernel=true \\\n",
" --allow_custom_op"
],
"execution_count": 51,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2021-10-23 11:15:38.878598: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1\n",
"2021-10-23 11:15:38.891526: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:38.892103: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:38.892379: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:38.893903: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:38.894979: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:38.895264: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:38.896913: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:38.897925: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:38.901414: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:38.901520: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:38.902087: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:38.902614: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:38.907393: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2299995000 Hz\n",
"2021-10-23 11:15:38.907587: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b1f27bed80 initialized for platform Host (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:38.907633: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version\n",
"2021-10-23 11:15:39.126887: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:39.127756: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55b1f27bf800 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
"2021-10-23 11:15:39.127792: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Tesla P100-PCIE-16GB, Compute Capability 6.0\n",
"2021-10-23 11:15:39.127963: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:39.128531: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1639] Found device 0 with properties: \n",
"name: Tesla P100-PCIE-16GB major: 6 minor: 0 memoryClockRate(GHz): 1.3285\n",
"pciBusID: 0000:00:04.0\n",
"2021-10-23 11:15:39.128589: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:39.128611: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10\n",
"2021-10-23 11:15:39.128630: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10\n",
"2021-10-23 11:15:39.128650: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10\n",
"2021-10-23 11:15:39.128668: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10\n",
"2021-10-23 11:15:39.128686: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10\n",
"2021-10-23 11:15:39.128703: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7\n",
"2021-10-23 11:15:39.128771: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:39.129376: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:39.129900: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1767] Adding visible gpu devices: 0\n",
"2021-10-23 11:15:39.129963: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1\n",
"2021-10-23 11:15:39.131002: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1180] Device interconnect StreamExecutor with strength 1 edge matrix:\n",
"2021-10-23 11:15:39.131027: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1186] 0 \n",
"2021-10-23 11:15:39.131037: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1199] 0: N \n",
"2021-10-23 11:15:39.131140: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:39.131734: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:983] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero\n",
"2021-10-23 11:15:39.132242: W tensorflow/core/common_runtime/gpu/gpu_bfc_allocator.cc:39] Overriding allow_growth setting because the TF_FORCE_GPU_ALLOW_GROWTH environment variable is set. Original config value was 0.\n",
"2021-10-23 11:15:39.132296: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1325] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 15224 MB memory) -> physical GPU (device: 0, name: Tesla P100-PCIE-16GB, pci bus id: 0000:00:04.0, compute capability: 6.0)\n"
]
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "-00rT8pOV_mq"
},
"source": [
"# File compression amd copy google drive."
]
},
{
"cell_type": "code",
"metadata": {
"id": "BVIDYE0QWGZl",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "5637d69a-4e68-412b-f1da-3bf93d7b6e27"
},
"source": [
"%cd /content/\n",
"!tar czf /content/tflite_model.tar.gz ./tflite_models/"
],
"execution_count": 55,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"/content\n"
]
}
]
},
{
"cell_type": "code",
"metadata": {
"id": "RwhPcF5d2i-B"
},
"source": [
"!cp /content/tflite_model.tar.gz /content/drive/MyDrive"
],
"execution_count": 56,
"outputs": []
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment