Skip to content

Commit

Permalink
Tf-lite conversion is fixed.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 352546075
  • Loading branch information
TensorFlow Hub Authors authored and copybara-github committed Jan 19, 2021
1 parent 9fe2698 commit 4bc1bc4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions examples/colab/tf2_image_retraining.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,6 @@
"outputs": [],
"source": [
"#@title Optimization settings\n",
"# docs_infra: no_execute\n",
"# TODO(b/156102192)\n",
"optimize_lite_model = False #@param {type:\"boolean\"}\n",
"#@markdown Setting a value greater than zero enables quantization of neural network activations. A few dozen is already a useful amount.\n",
"num_calibration_examples = 60 #@param {type:\"slider\", min:0, max:1000, step:1}\n",
Expand Down Expand Up @@ -428,7 +426,6 @@
},
"outputs": [],
"source": [
"# docs_infra: no_execute\n",
"interpreter = tf.lite.Interpreter(model_content=lite_model_content)\n",
"# This little helper wraps the TF Lite interpreter as a numpy-to-numpy function.\n",
"def lite_model(images):\n",
Expand All @@ -447,7 +444,6 @@
"outputs": [],
"source": [
"#@markdown For rapid experimentation, start with a moderate number of examples.\n",
"# docs_infra: no_execute\n",
"num_eval_examples = 50 #@param {type:\"slider\", min:0, max:700}\n",
"eval_dataset = ((image, label) # TFLite expects batch size 1.\n",
" for batch in train_generator\n",
Expand Down

0 comments on commit 4bc1bc4

Please sign in to comment.