Commit 570fde70 authored by henrymai's avatar henrymai Committed by mcarilli
Browse files

Add prelu to list of torch overrides (#217)

* Add prelu to list of torch overrides

This is to fix the following error:

  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/container.py", line 92, in forward
    input = module(input)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/module.py", line 489, in __call__
    result = self.forward(*input, **kwargs)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/modules/activation.py", line 722, in forward
    return F.prelu(input, self.weight)
  File "/opt/conda/lib/python3.6/site-packages/torch/nn/functional.py", line 1040, in prelu
    return torch.prelu(input, weight)
RuntimeError: expected scalar type Half but found Float

* Update torch_overrides.py
parent ba429e51
...@@ -70,6 +70,7 @@ CASTS = [ ...@@ -70,6 +70,7 @@ CASTS = [
'addcmul', 'addcmul',
'atan2', 'atan2',
'cross', 'cross',
'prelu',
# Element-wise _or_ tensor-wise math # Element-wise _or_ tensor-wise math
'add', 'add',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment