Skip to content

Error while running evaluate on keras_parikh_entailment #2362

@Nitya05

Description

@Nitya05

How to reproduce the behaviour

I am getting the following error when i try to run evaluate (after doing the training) with the below command:
python keras_parikh_entailment/ evaluate snli_1.0_train.jsonl snli_1.0_dev.jsonl

Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/ctg_nitya/venv_keras1.2.2/Workspace/spaCy/examples/keras_parikh_entailment/main.py", line 143, in
plac.call(main)
File "/home/ctg_nitya/venv_keras1.2.2/local/lib/python2.7/site-packages/plac_core.py", line 328, in call
cmd, result = parser.consume(arglist)
File "/home/ctg_nitya/venv_keras1.2.2/local/lib/python2.7/site-packages/plac_core.py", line 207, in consume
return cmd, self.func(*(args + varargs + extraopts), **kwargs)
File "/home/ctg_nitya/venv_keras1.2.2/Workspace/spaCy/examples/keras_parikh_entailment/main.py", line 137, in main
correct, total = evaluate(dev_loc)
File "/home/ctg_nitya/venv_keras1.2.2/Workspace/spaCy/examples/keras_parikh_entailment/main.py", line 69, in evaluate
if sim.argmax() == label.argmax():
AttributeError: 'float' object has no attribute 'argmax'

Your Environment

  • Operating System: Linux
  • Python Version Used: 2.7.12
  • spaCy Version Used: 2.0.11
  • Environment Information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesCode examples in /examples

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions