wb14123 / seq2seq-couplet Goto Github PK
View Code? Open in Web Editor NEWPlay couplet with seq2seq model. 用深度学习对对联。
Home Page: https://ai.binwang.me/couplet
License: GNU Affero General Public License v3.0
Play couplet with seq2seq model. 用深度学习对对联。
Home Page: https://ai.binwang.me/couplet
License: GNU Affero General Public License v3.0
Traceback (most recent call last):
File "D:/CODE/project/tensorflow/seq2seq-couplet/couplet.py", line 13, in
restore_model=False)
File "D:\CODE\project\tensorflow\seq2seq-couplet\model.py", line 33, in init
train_target_file, vocab_file, batch_size)
File "D:\CODE\project\tensorflow\seq2seq-couplet\reader.py", line 50, in init
self.vocabs = read_vocab(vocab_file)
File "D:\CODE\project\tensorflow\seq2seq-couplet\reader.py", line 33, in read_vocab
f = open(vocab_file, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: '/data/dl-data/couplet/vocabs'
上联: 蔡徐坤鸡你太美
请问我们这工程用的tensorflow版本是多少呀?我现在用的是tensorflow 1.11.0的版本,但运行couplet.py训练模型的过程中出现如下错误:
"D:\Program Files\Anaconda3\python.exe" K:/other_proj/seq2seq-couplet-master/couplet.py
D:\Program Files\Anaconda3\lib\site-packages\h5py_init_.py:34: FutureWarning: Conversion of the second argument of issubdtype from float
to np.floating
is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type
.
from ._conv import register_converters as _register_converters
WARNING:tensorflow:From K:\other_proj\seq2seq-couplet-master\seq2seq.py:12: BasicLSTMCell.init (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.
Instructions for updating:
This class is deprecated, please use tf.nn.rnn_cell.LSTMCell, which supports all the feature this cell currently has. Please replace the existing code with tf.nn.rnn_cell.LSTMCell(name='basic_lstm_cell').
2019-01-21 10:06:30.391998: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Reloading model file before training.
Saving model. Step: 0, loss: 0.956932
src:不 欲 干 鞋 沾 湿 水
output:
target: 何 妨 赤 脚 濯 清 流
Evaluate model. Step: 0, score: 0.000000, loss: 0.956932
2019-01-21 10:12:55.659938: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:56.320540: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:56.545342: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:56.794942: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:57.013343: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:57.233946: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:57.498948: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:57.717348: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:57.966949: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:58.214553: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:58.428354: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:58.678955: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:58.881755: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:59.141356: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:59.357157: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:59.591158: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:12:59.809558: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:00.027959: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:00.269563: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:00.524771: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:00.743172: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:00.977172: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:01.214173: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:01.448376: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:01.666776: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:01.885177: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
2019-01-21 10:13:02.119177: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at variable_ops.cc:104 : Already exists: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
Traceback (most recent call last):
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1292, in _do_call
return fn(*args)
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1277, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1367, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.AlreadyExistsError: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
[[{{node gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var}} = TemporaryVariabledtype=DT_FLOAT, shape=[1024], var_name="gradients/...dd/tmp_var", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "K:/other_proj/seq2seq-couplet-master/couplet.py", line 15, in
m.train(50000)
File "K:\other_proj\seq2seq-couplet-master\model.py", line 135, in train
self.train_target_seq_len: target_seq_len})
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 887, in run
run_metadata_ptr)
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1110, in _run
feed_dict_tensor, options, run_metadata)
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1286, in _do_run
run_metadata)
File "D:\Program Files\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1308, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.AlreadyExistsError: Resource __per_step_136/gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var/struct tensorflow::TemporaryVariableOp::TmpVar
[[{{node gradients/decoder/while/BasicDecoderStep/decoder/attention_wrapper/bahdanau_attention/mul/Enter_1_grad/ArithmeticOptimizer/AddOpsRewrite_Add/tmp_var}} = TemporaryVariabledtype=DT_FLOAT, shape=[1024], var_name="gradients/...dd/tmp_var", _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
Process finished with exit code 1
上联: 包子包食饱
对的: 花生子女香
上联: 深水潭 冷冰寒
对的: 古松石 古柏枯
革命尚未成功, 小AI尚需努力~
for layer_id in range(bi_layer_size):
encoder_state.append(bi_encoder_state[0][layer_id])
encoder_state.append(bi_encoder_state[1][layer_id])
encoder_state = tuple(encoder_state)
and i do not know why we should change the order of encoder_state? And i think the attention model just use the last output about encoder.
大神666
InvalidArgumentError (see above for traceback): Found Inf or NaN global norm. : Tensor had Inf values
[[node VerifyFinite/CheckNumerics (defined at C:\Users\xxx\seq2seq-couplet-master1\model.py:79) = CheckNumericsT=DT_FLOAT, message="Found Inf or NaN global norm.", _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
上联:我对钱不感兴趣,下联竟是:你和气生财生财
完全对不上啊
2018-04-12 15:19:39.686884: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2018-04-12 15:19:39.763650: W tensorflow/core/framework/op_kernel.cc:1273] OP_REQUIRES failed at save_restore_tensor.cc:170 : Not found: Unsuccessful TensorSliceReader constructor: Failed to find any matching files for /Users/info_kerwin/Desktop/seq2seq/data/dl-data/models/tf-lib/output_couplet_prod/model.ckpl
couplet.py训练完后的数据是四个:model.ckpl.data-00000-of-00001、model.ckpl.index、model.ckpl.meta、checkpoint,运行server.py是如何产生model.ckpl文件的?
Tensorflow版本是多少
上联: 一点青山 二分秋水 藏不住 三里桃花
上联:水映青山山映水
Why the loss when I train the net? I use the set of download.
作者您好,我并没有在程序页面看到能够选择哪块GPU的选项啊,求问如何做到选择第几块GPU来训练呢?
上联:
李云龙平安夜打平安县城
下联:
花莲喷水池水喷莲花莲湖
还需努力学习
兄弟,你看看“百万坦克上广场”下一句是什么,祝好
今天偶然间知乎推送了这个项目,打开看了下真有意思。试了一下这个对联的接口,发现主页面还是nginx的欢迎界面,哈哈!
有点好奇深度学习跑出来的模型,怎么运行产生后端接口来访问?是怎么的一套流程呢?老哥有空的时候方便说下?
我想在自己的小项目网站加上这个对对联的功能,不会有多少访问量,纯属自娱自乐。
要是兄弟你觉得不行,跟我说下我随时撤掉。
最后膜拜大佬!
'gbk' codec can't decode byte 0x9a in position 2: illegal multibyte sequence
我跑数据集跑了一下午,现在到了step:86600,loss:34.250666
有什么结束标志嘛==
试试:“一生只爱孙笑川”
E5-2620 24核,没有gpu,已经一个月多了,才训练到
Saving model. Step: 520900, loss: 27.184117。
求训练好的模型,谢谢
才down下来的代码,加载库的时候, TensorFlow 的contrib 和 python.layers都me的了,有大神教教怎么解决么
在demo里,有几个词语都被对成了“开发区”
目前我看到的有:
好运气
运动会
大新闻
这是不是一个bug的征兆?
上联:
坝长千尺难防民口,墙高万丈莫拦人心
下联:
钱通万件不通法眼,量大千秋牢记公平
能否提供下已经下载好的数据集,感谢
上联:
一枕松风声更幽
下联:
半窗竹影韵尤幽
下联:
一枕松风声更幽
下联:
半窗竹影韵尤幽
(无限循环)
感觉这个损失函数是不是有点问题啊,tf.reduce_sum(cost) / tf.to_float(batch_size),分子是cost的和,分母怎么会是batchsize?不应该是tf.reduce_sum(loss_mask)么?
跪求解答...
能提供最新的数据吗?谢谢![email protected]
作者吃点好的
不小心贴了一句繁体字,然后发现行为很迷啊。
Traceback (most recent call last):
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1322, in _do_call
return fn(*args)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1307, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1409, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[32,4096] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[Node: bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/job:localhost/replica:0/task:0/device:GPU:0"](bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/concat, bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/MatMul/Enter)]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
[[Node: decoder/while/BasicDecoderStep/decoder/attention_wrapper/assert_equal/All/_129 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_862_d..._equal/All", tensor_type=DT_BOOL, _device="/job:localhost/replica:0/task:0/device:CPU:0"](^_cloopdecoder/while/BasicDecoderStep/decoder/attention_wrapper/assert_equal/Assert/Assert/data_0/_5)]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/CODE/project/tensorflow/seq2seq-couplet/couplet.py", line 15, in
m.train(5000000)
File "D:\CODE\project\tensorflow\seq2seq-couplet\model.py", line 149, in train
self.train_target_seq_len: target_seq_len})
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 900, in run
run_metadata_ptr)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1316, in _do_run
run_metadata)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\client\session.py", line 1335, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.ResourceExhaustedError: OOM when allocating tensor with shape[32,4096] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[Node: bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/job:localhost/replica:0/task:0/device:GPU:0"](bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/concat, bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/MatMul/Enter)]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
[[Node: decoder/while/BasicDecoderStep/decoder/attention_wrapper/assert_equal/All/_129 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_862_d..._equal/All", tensor_type=DT_BOOL, _device="/job:localhost/replica:0/task:0/device:CPU:0"](^_cloopdecoder/while/BasicDecoderStep/decoder/attention_wrapper/assert_equal/Assert/Assert/data_0/_5)]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
Caused by op 'bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/MatMul', defined at:
File "D:/CODE/project/tensorflow/seq2seq-couplet/couplet.py", line 13, in
restore_model=False)
File "D:\CODE\project\tensorflow\seq2seq-couplet\model.py", line 45, in init
self._init_train()
File "D:\CODE\project\tensorflow\seq2seq-couplet\model.py", line 72, in _init_train
self.num_units, self.layers, self.dropout)
File "D:\CODE\project\tensorflow\seq2seq-couplet\seq2seq.py", line 129, in seq2seq
num_units, layers, input_keep_prob)
File "D:\CODE\project\tensorflow\seq2seq-couplet\seq2seq.py", line 26, in bi_encoder
time_major = False)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn.py", line 403, in bidirectional_dynamic_rnn
time_major=time_major, scope=fw_scope)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn.py", line 618, in dynamic_rnn
dtype=dtype)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn.py", line 815, in _dynamic_rnn_loop
swap_memory=swap_memory)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 3209, in while_loop
result = loop_context.BuildLoop(cond, body, loop_vars, shape_invariants)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2941, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 2878, in _BuildLoop
body_result = body(*packed_vars_for_body)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\control_flow_ops.py", line 3179, in
body = lambda i, lv: (i + 1, orig_body(*lv))
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn.py", line 784, in _time_step
skip_conditionals=True)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn.py", line 239, in _rnn_step
new_output, new_state = call_cell()
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn.py", line 772, in
call_cell = lambda: cell(input_t, state)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 232, in call
return super(RNNCell, self).call(inputs, state)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\layers\base.py", line 329, in call
outputs = super(Layer, self).call(inputs, *args, **kwargs)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 703, in call
outputs = self.call(inputs, *args, **kwargs)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 1325, in call
cur_inp, new_state = cell(cur_inp, cur_state)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 1126, in call
output, new_state = self._cell(inputs, state, scope=scope)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 339, in call
*args, **kwargs)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\layers\base.py", line 329, in call
outputs = super(Layer, self).call(inputs, *args, **kwargs)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\keras\engine\base_layer.py", line 703, in call
outputs = self.call(inputs, *args, **kwargs)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\rnn_cell_impl.py", line 638, in call
array_ops.concat([inputs, h], 1), self._kernel)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\math_ops.py", line 2014, in matmul
a, b, transpose_a=transpose_a, transpose_b=transpose_b, name=name)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\ops\gen_math_ops.py", line 4567, in mat_mul
name=name)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 787, in _apply_op_helper
op_def=op_def)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 3414, in create_op
op_def=op_def)
File "C:\Users\47263\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1740, in init
self._traceback = self._graph._extract_stack() # pylint: disable=protected-access
ResourceExhaustedError (see above for traceback): OOM when allocating tensor with shape[32,4096] and type float on /job:localhost/replica:0/task:0/device:GPU:0 by allocator GPU_0_bfc
[[Node: bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/MatMul = MatMul[T=DT_FLOAT, transpose_a=false, transpose_b=false, _device="/job:localhost/replica:0/task:0/device:GPU:0"](bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/concat, bidirectional_rnn/fw/fw/while/fw/multi_rnn_cell/cell_1/basic_lstm_cell/MatMul/Enter)]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
[[Node: decoder/while/BasicDecoderStep/decoder/attention_wrapper/assert_equal/All/_129 = _Recv[client_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_862_d..._equal/All", tensor_type=DT_BOOL, _device="/job:localhost/replica:0/task:0/device:CPU:0"](^_cloopdecoder/while/BasicDecoderStep/decoder/attention_wrapper/assert_equal/Assert/Assert/data_0/_5)]]
Hint: If you want to see a list of allocated tensors when OOM happens, add report_tensor_allocations_upon_oom to RunOptions for current allocation info.
In the README.md
Line 30, Column 29
Nivida -> Nvidia
meh
想知道给出下联,能得到什么样的上联
如题
大神你好,能否提供一下你的训练好的模型?可以的话感激不尽~~~
喵喵喵?
2019-08-06 00:52:38.476421: E tensorflow/core/kernels/check_numerics_op.cc:185] abnormal_detected_host @0x7fb3e960d900 = {0, 1} Found Inf or
NaN global norm.Traceback (most recent call last):
File "/root/anaconda3/envs/fjpy36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1334, in _do_call
return fn(*args)
File "/root/anaconda3/envs/fjpy36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1319, in _run_fn
options, feed_dict, fetch_list, target_list, run_metadata)
File "/root/anaconda3/envs/fjpy36/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1407, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Found Inf or NaN global norm. : Tensor had Inf values
[[{{node VerifyFinite/CheckNumerics}} = CheckNumericsT=DT_FLOAT, message="Found Inf or NaN global norm.", _device="/job:localhost/r
eplica:0/task:0/device:GPU:0"]] [[{{node clip_by_global_norm/mul_1/_301}} = _Recvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:CPU:0
", send_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device_incarnation=1, tensor_name="edge_2818_clip_by_global_norm/mul_1", tensor_type=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.