在// dragnn / tools中运行错误://evaluator.py

时间:2017-04-27 03:04:58

标签: tensorflow syntaxnet

我希望运行drangg模型进行预测。我按照指南,但发生了一些错误。

运行命令如下:

    bazel run -c opt <"/home/models/syntaxnet/dragnn/tools/">: evaluator -- \
  --master_spec="/home//models/syntaxnet/trained-English/parser_spec.textproto" \
  --checkpoint_file="/home/models/syntaxnet/trained-English/checkpoint" \ 
  --input_file="/home/data/UD_English/en-ud-dev.conllu" \
  --output_file="/home/models/syntaxnet/trained-English/test-English.conll"

然后发生了一些错误:

INFO: Running command line: bazel-bin/dragnn/tools/evaluator --master_spec /conll2017/conll17/English/parser_spec.textproto --checkpoint_file /conll2017/conll17/English/checkpoint --input_file /conll2017/input.txt
INFO:tensorflow:Building the graph
INFO:tensorflow:[char_lstm] input_dropout_rate=1.0 recurrent_dropout_rate=0.8
Traceback (most recent call last):
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/tools/evaluator.py", line 168, in <module>
    tf.app.run()
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/org_tensorflow/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/tools/evaluator.py", line 108, in main
    builder = graph_builder.MasterBuilder(master_spec, hyperparam_config)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/python/graph_builder.py", line 175, in __init__
    component_spec)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/syntaxnet/util/registry.py", line 182, in Create
    return _ResolveAndCreate(baseclass, path, subclass_name, *args, **kwargs)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/syntaxnet/util/registry.py", line 166, in _ResolveAndCreate
    subclass = _Create(baseclass, resolved_subclass_name, *args, **kwargs)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/syntaxnet/util/registry.py", line 131, in _Create
    return subclass(*args, **kwargs)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/python/component.py", line 116, in __init__
    self.network = self.make_network(self.spec.network_unit)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/python/component.py", line 143, in make_network
    return network_units.NetworkUnitInterface.Create(network_type, self)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/syntaxnet/util/registry.py", line 182, in Create
    return _ResolveAndCreate(baseclass, path, subclass_name, *args, **kwargs)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/syntaxnet/util/registry.py", line 166, in _ResolveAndCreate
    subclass = _Create(baseclass, resolved_subclass_name, *args, **kwargs)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/syntaxnet/util/registry.py", line 131, in _Create
    return subclass(*args, **kwargs)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/python/wrapped_units.py", line 234, in __init__
    super(LayerNormBasicLSTMNetwork, self).__init__(component)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/python/wrapped_units.py", line 102, in __init__
    component, init_layers=layers, init_context_layers=context_layers)
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/dragnn/python/network_units.py", line 657, in __init__
    check.Gt(spec.size, 0, 'Invalid fixed feature size')
  File "/root/.cache/bazel/_bazel_root/821bda42e7dedbfae9d936785dd2d125/execroot/syntaxnet/bazel-out/local-opt/bin/dragnn/tools/evaluator.runfiles/__main__/syntaxnet/util/check.py", line 38, in Gt
    raise error('Expected (%s) > (%s): %s' % (lhs, rhs, message))
ValueError: Expected (0) > (0): Invalid fixed feature size

有人可以告诉我如何解决这个问题吗?

0 个答案:

没有答案