<commit_before>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# MNIST Image Classification with TensorFlow on Vertex AI\n",
    "\n",
    "This notebook demonstrates how to implement different image models on MNIST using the [tf.keras API](https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/keras).\n",
    "\n",
    "## Learning Objectives\n",
    "1. Understand how to build a Dense Neural Network (DNN) for image classification\n",
    "2. Understand how to use dropout (DNN) for image classification\n",
    "3. Understand how to use Convolutional Neural Networks (CNN)\n",
    "4. Know how to deploy and use an image classifcation model using Google Cloud's [Vertex AI](https://cloud.google.com/vertex-ai/)\n",
    "\n",
    "First things first. Configure the parameters below to match your own Google Cloud project details."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from datetime import datetime\n",
    "import os\n",
    "\n",
    "REGION = 'us-central1'\n",
    "PROJECT = !(gcloud config get-value core/project)\n",
    "PROJECT = PROJECT[0]\n",
    "BUCKET =  PROJECT\n",
    "MODEL_TYPE = \"cnn\"  # \"linear\", \"dnn\", \"dnn_dropout\", or \"dnn\"\n",
    "\n",<commit_msg>Update 2_mnist_models_vertex.ipynb<commit_after>{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# MNIST Image Classification with TensorFlow on Vertex AI\n",
    "\n",
    "This notebook demonstrates how to implement different image models on MNIST using the [tf.keras API](https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/keras).\n",
    "\n",
    "## Learning Objectives\n",
    "1. Understand how to build a Dense Neural Network (DNN) for image classification\n",
    "2. Understand how to use dropout (DNN) for image classification\n",
    "3. Understand how to use Convolutional Neural Networks (CNN)\n",
    "4. Know how to deploy and use an image classifcation model using Google Cloud's [Vertex AI](https://cloud.google.com/vertex-ai/)\n",
    "\n",
    "First things first. Configure the parameters below to match your own Google Cloud project details."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "from datetime import datetime\n",
    "import os\n",
    "\n",
    "REGION = 'us-central1'\n",
    "PROJECT = !(gcloud config get-value core/project)\n",
    "PROJECT = PROJECT[0]\n",
    "BUCKET =  PROJECT\n",
    "MODEL_TYPE = \"cnn\"  # \"linear\", \"dnn\", \"dnn_dropout\", or \"cnn\"\n",
    "\n",
{'fraction_non_alphanumeric': 0.16484345529988684, 'fraction_numerical': 0.006412674462466994, 'mean_word_length': 3.1116279069767443, 'pattern_counts': {'":': 18, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6344172', 'n_tokens_mistral': 902, 'n_tokens_neox': 876, 'n_words': 260}