Skip to content

Commit

Permalink
Merge pull request #424 from GoogleCloudPlatform/fix_xai_scale
Browse files Browse the repository at this point in the history
Fixed wrong pixel scales in XAI notebook
  • Loading branch information
takumiohym authored Mar 21, 2024
2 parents 9ebea21 + edf93b4 commit 065baf5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,7 @@
" decoded = tf.io.decode_jpeg(bytes_input, channels=3)\n",
" decoded = tf.image.convert_image_dtype(decoded, tf.float32)\n",
" resized = #TODO: Resize decoded image\n",
" rescale = #TODO: Rescale image\n",
" return rescale\n",
" return resized\n",
"\n",
"\n",
"@tf.function(input_signature=[tf.TensorSpec([None], tf.string)])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,7 @@
" decoded = tf.io.decode_jpeg(bytes_input, channels=3)\n",
" decoded = tf.image.convert_image_dtype(decoded, tf.float32)\n",
" resized = tf.image.resize(decoded, size=(192, 192))\n",
" rescale = tf.cast(resized / 255.0, tf.float32)\n",
" return rescale\n",
" return resized\n",
"\n",
"\n",
"@tf.function(input_signature=[tf.TensorSpec([None], tf.string)])\n",
Expand Down

0 comments on commit 065baf5

Please sign in to comment.