|
106 | 106 | "# Path where the https://github.com/tensorflow/models repo will be cloned\n", |
107 | 107 | "tf_models_dir = os.path.join(output_directory, \"tensorflow-models\")\n", |
108 | 108 | "os.environ[\"TF_MODELS_DIR\"] = tf_models_dir\n", |
109 | | - "tf_models_branch = \"v2.7.0\"\n", |
| 109 | + "tf_models_branch = \"v2.11.0\"\n", |
110 | 110 | "\n", |
111 | 111 | "# Clone the TensorFlow models repo\n", |
112 | 112 | "if not os.path.exists(tf_models_dir):\n", |
|
296 | 296 | " os.makedirs(checkpoint_dir)\n", |
297 | 297 | "\n", |
298 | 298 | "os.environ[\"TFHUB_CACHE_DIR\"] = os.path.join(output_directory, \"tfhub_modules\")\n", |
299 | | - "!python $tf_models_dir/official/nlp/bert/run_squad.py \\\n", |
| 299 | + "!python $tf_models_dir/official/legacy/bert/run_squad.py \\\n", |
300 | 300 | " --mode=train_and_eval \\\n", |
301 | 301 | " --input_meta_data_path=$squad_metadata_path \\\n", |
302 | 302 | " --train_data_path=$train_mini_tfrecords_path \\\n", |
|
337 | 337 | "outputs": [], |
338 | 338 | "source": [ |
339 | 339 | "import tensorflow as tf\n", |
340 | | - "from official.nlp.bert import bert_models\n", |
341 | | - "from official.nlp.bert import configs as bert_configs\n", |
342 | | - "from official.nlp.bert import model_saving_utils\n", |
| 340 | + "from official.legacy.bert import bert_models\n", |
| 341 | + "from official.legacy.bert import configs as bert_configs\n", |
| 342 | + "from official.legacy.bert import model_saving_utils\n", |
343 | 343 | "\n", |
344 | 344 | "tf.keras.mixed_precision.set_global_policy('float32')\n", |
345 | 345 | "bert_config_obj = bert_configs.BertConfig.from_json_file(bert_config)\n", |
|
0 commit comments