Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running using command TypeError: Unknown parameter type: <class 'theano.tensor.var.TensorVariable'> #127

Closed
Minashraf opened this issue Nov 23, 2021 · 4 comments

Comments

@Minashraf
Copy link

I am getting this error when running the following code on colab

!nlg-eval --hypothesis=outputs/x_NLMCXR_ClsGenInt_DenseNet121_MaxView2_NumLabel114_History_Hyp.txt --references=outputs/x_NLMCXR_ClsGenInt_DenseNet121_MaxView2_NumLabel114_History_Ref.txt

Traceback (most recent call last):
  File "/usr/local/bin/nlg-eval", line 216, in <module>
    compute_metrics()
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/bin/nlg-eval", line 208, in compute_metrics
    nlgeval.compute_metrics(hypothesis, references, no_overlap, no_skipthoughts, no_glove)
  File "/usr/local/lib/python3.7/dist-packages/nlgeval/__init__.py", line 57, in compute_metrics
    model = skipthoughts.load_model()
  File "/usr/local/lib/python3.7/dist-packages/nlgeval/skipthoughts/skipthoughts.py", line 53, in load_model
    embedding, x_mask, ctxw2v = build_encoder(utparams, uoptions)
  File "/usr/local/lib/python3.7/dist-packages/nlgeval/skipthoughts/skipthoughts.py", line 312, in build_encoder
    mask=x_mask)
  File "/usr/local/lib/python3.7/dist-packages/nlgeval/skipthoughts/skipthoughts.py", line 437, in gru_layer
    strict=True)
  File "/usr/local/lib/python3.7/dist-packages/theano/scan_module/scan.py", line 849, in scan
    profile=False)
  File "/usr/local/lib/python3.7/dist-packages/theano/compile/function/__init__.py", line 350, in function
    output_keys=output_keys,
  File "/usr/local/lib/python3.7/dist-packages/theano/compile/function/pfunc.py", line 427, in pfunc
    _pfunc_param_to_in(p, allow_downcast=allow_input_downcast) for p in params
  File "/usr/local/lib/python3.7/dist-packages/theano/compile/function/pfunc.py", line 427, in <listcomp>
    _pfunc_param_to_in(p, allow_downcast=allow_input_downcast) for p in params
  File "/usr/local/lib/python3.7/dist-packages/theano/compile/function/pfunc.py", line 543, in _pfunc_param_to_in
    raise TypeError(f"Unknown parameter type: {type(param)}")
TypeError: Unknown parameter type: <class 'theano.tensor.var.TensorVariable'>

@juharris
Copy link
Member

Can you share some details about your environment? Output of pip freeze would help.

@Minashraf
Copy link
Author

Managed to solve it
Thank you

@juharris
Copy link
Member

Oh good. Someone else is having a similar issue, can you share how you resolved it?

@Minashraf
Copy link
Author

Sorry, but I don't really remember :(
It was like a week ago

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants