wshuyi/demo-chinese-text-binary-classification-with-bert

请教一下

Opened this issue · 2 comments

运行最后一步result, estimator的时候出现URLError: <urlopen error [Errno 101] Network is unreachable>,请问怎么解决呀

运行最后一步result, estimator的时候出现URLError: <urlopen error [Errno 101] Network is unreachable>,请问怎么解决呀

可以将代码中的

my_param = {
    "data_column": "comment",
    "label_column": "sentiment",
    "learning_rate": 2e-5,
    "num_train_epochs": 3,
    "bert_model_hub": "https://tfhub.dev/google/bert_chinese_L-12_H-768_A-12/1"
}

改成

my_param = {
    "data_column": "comment",
    "label_column": "sentiment",
    "learning_rate": 2e-5,
    "num_train_epochs": 3,
    "bert_model_hub": "https://storage.googleapis.com/tfhub-modules/google/bert_chinese_L-12_H-768_A-12/1.tar.gz"
}

或者使用先下载预训练模型再直接加载本地路径, 可参考 https://github.com/tensorflow/hub/blob/master/docs/common_issues.md