From c72b66ee7e6146c440280ac0a0d319716c59094c Mon Sep 17 00:00:00 2001 From: HYUNSOO HA Date: Mon, 2 Aug 2021 16:05:50 +0900 Subject: [PATCH] [FIX] Error Fixed for Tensorflow V2 --- create_pretraining_data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/create_pretraining_data.py b/create_pretraining_data.py index 5340d96ae..1daab7d9a 100644 --- a/create_pretraining_data.py +++ b/create_pretraining_data.py @@ -22,6 +22,9 @@ import random import tokenization import tensorflow as tf +if(tf.__version__.startswith("2")): + tf.gfile = tf.io.gfile + tf.flags = tf.compat.v1.flags flags = tf.flags