
Traceback (most recent call last):


 "/tmp/tmp.8wcYIPL3yV/lib/python3.5/site-packages/salt/state.py", line 1934, in call

**cdata['kwargs'])


 "/tmp/tmp.8wcYIPL3yV/lib/python3.5/site-packages/salt/loader.py", line 1799, in wrapper

return f(*args, **kwargs)


 "/tmp/tmp.8wcYIPL3yV/lib/python3.5/site-packages/salt/states/docker_image.py", line 329, in present

msg = exc.__str__()

UnboundLocalError: local variable 'exc' referenced before assignment

Traceback (most recent call last):


 "c:\Users\Administrator\Desktop\keras_ner\ner.py", line 213, in <module>

file_path='data')


 "c:\Users\Administrator\Desktop\keras_ner\ner.py", line 77, in __init__

self.model = self.train()


 "c:\Users\Administrator\Desktop\keras_ner\ner.py", line 103, in train

loss, logits, text_lens = self.train_one_step(model, optimizer, text_batch, labels_batch)


 "c:\Users\Administrator\Desktop\keras_ner\ner.py", line 117, in train_one_step

logits, text_lens, log_likelihood = model(text_batch, labels_batch, training=True)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\keras\engine\base_layer.py", line 822, in __call__

outputs = self.call(cast_inputs, *args, **kwargs)


 "c:\Users\Administrator\Desktop\keras_ner\ner.py", line 41, in call

log_likelihood, self.transition_params = ta.text.crf_log_likelihood(logits, label_sequences, text_lens)


 "D:\anaconda3\lib\site-packages\tensorflow_addons\text\crf.py", line 214, in crf_log_likelihood

inputs, tag_indices, sequence_lengths, transition_params


 "D:\anaconda3\lib\site-packages\tensorflow_addons\text\crf.py", line 77, in crf_sequence_score

return tf.cond(tf.equal(tf.shape(inputs)[1], 1), _single_seq_fn, _multi_seq_fn)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\ops\control_flow_ops.py", line 1389, in cond_for_tf_v2

return cond(pred, true_fn=true_fn, false_fn=false_fn, strict=True, name=name)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\util\deprecation.py", line 507, in new_func

return func(*args, **kwargs)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\ops\control_flow_ops.py", line 1204, in cond

result = false_fn()


 "D:\anaconda3\lib\site-packages\tensorflow_addons\text\crf.py", line 72, in _multi_seq_fn

tag_indices, sequence_lengths, transition_params


 "D:\anaconda3\lib\site-packages\tensorflow_addons\text\crf.py", line 291, in crf_binary_score

binary_scores = tf.gather(flattened_transition_params, flattened_transition_indices)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\util\dispatch.py", line 180, in wrapper

return target(*args, **kwargs)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 4125, in gather_v2

batch_dims=batch_dims)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\util\dispatch.py", line 180, in wrapper

return target(*args, **kwargs)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\ops\array_ops.py", line 4108, in gather

return gen_array_ops.gather_v2(params, indices, axis, name=name)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\ops\gen_array_ops.py", line 3683, in gather_v2

_ops.raise_from_not_ok_status(e, name)


 "D:\anaconda3\lib\site-packages\tensorflow_core\python\framework\ops.py", line 6606, in raise_from_not_ok_status

six.raise_from(core._status_to_exception(e.code, message), None)


 "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: indices[0,77] = -1 is not in [0, 49) [Op:GatherV2]
