Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

测试错误 #6

Open
niliusha123 opened this issue Jun 10, 2019 · 3 comments
Open

测试错误 #6

niliusha123 opened this issue Jun 10, 2019 · 3 comments

Comments

@niliusha123
Copy link

您好:我用python3.6,训练出现下面情况

  • 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:
  • name: GeForce RTX 2080 Ti major: 7 minor: 5 memoryClockRate(GHz): 1.545
  • pciBusID: 0000:02:00.0
  • totalMemory: 10.73GiB freeMemory: 10.53GiB
  • 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
  • emb_weights = load_vec(config["emb_file"], id_to_char, config["char_dim"], emb_weights)
    
  • 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'

请问该如何修改,谢谢

@hopegithub
Copy link

在目录configs下,有个文件config_file,修改其配置为:“emb_file”:"./assets/cooked_corpus/vec.txt"

@hopegithub
Copy link

@GaoQ1 这里有对应的论文没有呢

@niliusha123
Copy link
Author

在目录configs下,有个文件config_file,修改其配置为:“emb_file”:"./assets/cooked_corpus/vec.txt"

多谢,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants