Skip to content

Conversation

@daikikatsuragawa
Copy link

Signed-off-by: Daiki Katsuragawa [email protected]

I read that the return type of _estimate_policy_gradient is not float but torch.Tensor (array-like).

I checked with mypy in an experiment.

mypy --ignore-missing-imports --disallow-untyped-def --warn-unreachable obp

Then the following error occurs.

obp/policy/offline_continuous.py:481: error: "float" has no attribute "mean"  [attr-defined]
obp/policy/offline_continuous.py:504: error: "float" has no attribute "mean"  [attr-defined]

This means that float is specified as the return type of _estimate_policy_gradient, but float has no method named mean.

Signed-off-by: Daiki Katsuragawa <[email protected]>
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

Successfully merging this pull request may close these issues.

1 participant