Open Gemini77 opened 6 years ago
已解决
已解决
请问为什么有这个问题,怎么解决的呢
你解决了吗?具体怎么操作呢?
已解决
我今天运行还报这个错,是怎么解决的?原因是啥
你解决了吗?具体怎么操作呢?
试试这个方法:看看你的source_vocab.txt,如果是空的话就删除这个文件
已解决
请问为什么有这个问题,怎么解决的呢
试试这个方法:看看你的source_vocab.txt,如果是空的话就删除这个文件
我是这个错误, 怎么解决的?
Reloaded modules: config building word index... source vocabulary file has already existed, continue to next stage. target vocabulary file has already existed, continue to next stage. Traceback (most recent call last):
File "", line 1, in
runfile('D:/crf058/BNN+CRF/utils.py', wdir='D:/crf058/BNN+CRF')
File "D:\Python\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile execfile(filename, namespace)
File "D:\Python\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File "D:/crf058/BNN+CRF/utils.py", line 321, in
tf.tables_initializer().run()
File "D:\Python\lib\site-packages\tensorflow\python\framework\ops.py", line 2241, in run _run_using_default_session(self, feed_dict, self.graph, session)
File "D:\Python\lib\site-packages\tensorflow\python\framework\ops.py", line 4986, in _run_using_default_session session.run(operation, feed_dict)
File "D:\Python\lib\site-packages\tensorflow\python\client\session.py", line 877, in run run_metadata_ptr)
File "D:\Python\lib\site-packages\tensorflow\python\client\session.py", line 1100, in _run feed_dict_tensor, options, run_metadata)
File "D:\Python\lib\site-packages\tensorflow\python\client\session.py", line 1272, in _do_run run_metadata)
File "D:\Python\lib\site-packages\tensorflow\python\client\session.py", line 1291, in _do_call raise type(e)(node_def, op, message)
OutOfRangeError: Read fewer bytes than requested [[Node: index_to_string/table_init = InitializeTableFromTextFileV2[delimiter="\t", key_index=-1, value_index=-2, vocab_size=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](index_to_string, index_to_string/table_init/asset_filepath)]]
Caused by op 'index_to_string/table_init', defined at: File "D:\Python\lib\site-packages\spyder\utils\ipython\start_kernel.py", line 269, in
main()
File "D:\Python\lib\site-packages\spyder\utils\ipython\start_kernel.py", line 265, in main
kernel.start()
File "D:\Python\lib\site-packages\ipykernel\kernelapp.py", line 486, in start
self.io_loop.start()
File "D:\Python\lib\site-packages\tornado\platform\asyncio.py", line 127, in start
self.asyncio_loop.run_forever()
File "D:\Python\lib\asyncio\base_events.py", line 422, in run_forever
self._run_once()
File "D:\Python\lib\asyncio\base_events.py", line 1432, in _run_once
handle._run()
File "D:\Python\lib\asyncio\events.py", line 145, in _run
self._callback(self._args)
File "D:\Python\lib\site-packages\tornado\platform\asyncio.py", line 117, in _handle_events
handler_func(fileobj, events)
File "D:\Python\lib\site-packages\tornado\stack_context.py", line 276, in null_wrapper
return fn(args, kwargs)
File "D:\Python\lib\site-packages\zmq\eventloop\zmqstream.py", line 450, in _handle_events
self._handle_recv()
File "D:\Python\lib\site-packages\zmq\eventloop\zmqstream.py", line 480, in _handle_recv
self._run_callback(callback, msg)
File "D:\Python\lib\site-packages\zmq\eventloop\zmqstream.py", line 432, in _run_callback
callback(*args, *kwargs)
File "D:\Python\lib\site-packages\tornado\stack_context.py", line 276, in null_wrapper
return fn(args, kwargs)
File "D:\Python\lib\site-packages\ipykernel\kernelbase.py", line 283, in dispatcher
return self.dispatch_shell(stream, msg)
File "D:\Python\lib\site-packages\ipykernel\kernelbase.py", line 233, in dispatch_shell
handler(stream, idents, msg)
File "D:\Python\lib\site-packages\ipykernel\kernelbase.py", line 399, in execute_request
user_expressions, allow_stdin)
File "D:\Python\lib\site-packages\ipykernel\ipkernel.py", line 208, in do_execute
res = shell.run_cell(code, store_history=store_history, silent=silent)
File "D:\Python\lib\site-packages\ipykernel\zmqshell.py", line 537, in run_cell
return super(ZMQInteractiveShell, self).run_cell(*args, *kwargs)
File "D:\Python\lib\site-packages\IPython\core\interactiveshell.py", line 2662, in run_cell
raw_cell, store_history, silent, shell_futures)
File "D:\Python\lib\site-packages\IPython\core\interactiveshell.py", line 2785, in _run_cell
interactivity=interactivity, compiler=compiler, result=result)
File "D:\Python\lib\site-packages\IPython\core\interactiveshell.py", line 2909, in run_ast_nodes
if self.run_code(code, result):
File "D:\Python\lib\site-packages\IPython\core\interactiveshell.py", line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
runfile('D:/crf058/BNN+CRF/utils.py', wdir='D:/crf058/BNN+CRF')
File "D:\Python\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "D:\Python\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "D:/crf058/BNN+CRF/utils.py", line 314, in
src_vocab_file, default_value='')
File "D:\Python\lib\site-packages\tensorflow\python\ops\lookup_ops.py", line 1237, in index_to_string_table_from_file
return HashTable(init, default_value, shared_name=shared_name, name=scope)
File "D:\Python\lib\site-packages\tensorflow\python\ops\lookup_ops.py", line 279, in init
super(HashTable, self).init(table_ref, default_value, initializer)
File "D:\Python\lib\site-packages\tensorflow\python\ops\lookup_ops.py", line 171, in init
self._init = initializer.initialize(self)
File "D:\Python\lib\site-packages\tensorflow\python\ops\lookup_ops.py", line 544, in initialize
name=scope)
File "D:\Python\lib\site-packages\tensorflow\python\ops\gen_lookup_ops.py", line 317, in initialize_table_from_text_file_v2
vocab_size=vocab_size, delimiter=delimiter, name=name)
File "D:\Python\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "D:\Python\lib\site-packages\tensorflow\python\util\deprecation.py", line 454, in new_func
return func( args, **kwargs)
File "D:\Python\lib\site-packages\tensorflow\python\framework\ops.py", line 3155, in create_op
op_def=op_def)
File "D:\Python\lib\site-packages\tensorflow\python\framework\ops.py", line 1717, in init
self._traceback = tf_stack.extract_stack()
OutOfRangeError (see above for traceback): Read fewer bytes than requested [[Node: index_to_string/table_init = InitializeTableFromTextFileV2[delimiter="\t", key_index=-1, value_index=-2, vocab_size=-1, _device="/job:localhost/replica:0/task:0/device:CPU:0"](index_to_string, index_to_string/table_init/asset_filepath)]]