Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.699 seconds.
Prefix dict has been built succesfully.
开始训练模型!!!
13724it [00:00, 133884.01it/s]
Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
测试时报错如下
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.692 seconds.
Prefix dict has been built succesfully.
2019-06-10 23:07:51.152866: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-06-10 23:07:52.790032: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties:
2019-06-10 23:07:52.790099: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0
2019-06-10 23:07:53.229309: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-06-10 23:07:53.229363: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0
2019-06-10 23:07:53.229376: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N
2019-06-10 23:07:53.229666: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10168 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080 Ti, pci bus id: 0000:02:00.0, compute capability: 7.5)
WARNING:tensorflow:From /data/proj/Captcha/ner-slot_filling/models/model.py:385: softmax_cross_entropy_with_logits (from tensorflow.python.ops.nn_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Future major versions of TensorFlow will allow gradients to flow
into the labels input on backprop by default.
See tf.nn.softmax_cross_entropy_with_logits_v2.
/home/jiang.li/.local/lib/python3.6/site-packages/tensorflow/python/ops/gradients_impl.py:112: UserWarning: Converting sparse IndexedSlices to a dense Tensor of unknown shape. This may consume a large amount of memory.
"Converting sparse IndexedSlices to a dense Tensor of unknown shape. "
2019-06-10 23:07:55,057 - /data/proj/Captcha/ner-slot_filling/log/train.log - INFO - Created model with fresh parameters.
Loading pretrained embeddings from /Users/gaoquan/Documents/ml-learning/ner-learning/NER_medical_records/assets/cooked_corpus/vec.txt...
Traceback (most recent call last):
File "train_evaluate.py", line 251, in
main(args)
File "train_evaluate.py", line 247, in main
evaluate_line()
File "train_evaluate.py", line 230, in evaluate_line
load_word2vec, config, id_to_char, logger)
File "/data/proj/Captcha/ner-slot_filling/utils/utils.py", line 158, in create_model
File "/data/proj/Captcha/ner-slot_filling/utils/data_utils.py", line 172, in load_word2vec
for i, line in enumerate(codecs.open(emb_path, 'r', 'utf-8')):
File "/home/jiang.li/ENTER/envs/pytorch/lib/python3.6/codecs.py", line 897, in open
file = builtins.open(filename, mode, buffering)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/gaoquan/Documents/ml-learning/ner-learning/NER_medical_records/assets/cooked_corpus/vec.txt'
您好:我用python3.6,训练出现下面情况
测试时报错如下
tf.nn.softmax_cross_entropy_with_logits_v2
.请问该如何修改,谢谢