Running TensorFlow models with BigQuery ML
In this section, we'll import the TensorFlow model that we exported in the Converting BigQuery ML models into TensorFlow section. Once the model has been imported, we'll use it through the BigQuery ML syntax.
First, we need to remember that our BigQuery ML model has been exported into the folder of a Google Cloud storage bucket. The ML model is stored in the TensorFlow SavedModel format and is in the same format as any other ML model that's been developed by a data scientist using TensorFlow.
If we want to use a TensorFlow model in BigQuery ML, we need to perform the following steps:
- First, let's run the
CREATE OR REPLACE MODEL
SQL statement. Keep in mind that the path of the bucket – Â'gs://<PROJECT_NAME>-us-bigqueryml-export-tf/bqml_exported_model/*'
– is based on the name of your current project, so you need to replace the<PROJECT_NAME>
placeholder with the...