コード例 #1
0
 def test_model_from_pretrained(self):
     cache_dir = "/tmp/transformers_test/"
     # for model_name in list(TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_MAP.keys())[:1]:
     for model_name in ['albert-base-uncased']:
         model = TFAlbertModel.from_pretrained(
             model_name, cache_dir=cache_dir)
         shutil.rmtree(cache_dir)
         self.assertIsNotNone(model)
コード例 #2
0
 def test_model_from_pretrained(self):
     for model_name in TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_LIST[:1]:
         model = TFAlbertModel.from_pretrained(model_name)
         self.assertIsNotNone(model)
コード例 #3
0
 def test_model_from_pretrained(self):
     for model_name in list(TF_ALBERT_PRETRAINED_MODEL_ARCHIVE_MAP.keys())[:1]:
         model = TFAlbertModel.from_pretrained(model_name, cache_dir=CACHE_DIR)
         self.assertIsNotNone(model)