Skip to content
Snippets Groups Projects
Commit 2190cf11 authored by Gordian Edenhofer's avatar Gordian Edenhofer
Browse files

Model: Fix inferring `target` for overloaded `__call__`

parent c5443691
Branches
Tags
1 merge request!904Re likelihood
...@@ -230,7 +230,7 @@ class Model(AbstractModel): ...@@ -230,7 +230,7 @@ class Model(AbstractModel):
if domain is _NoValue and init is not _NoValue: if domain is _NoValue and init is not _NoValue:
domain = eval_shape(init, Initializer.domain) domain = eval_shape(init, Initializer.domain)
if target is _NoValue and domain is not _NoValue: if target is _NoValue and domain is not _NoValue:
target = eval_shape(call, domain) target = eval_shape(self, domain) # Honor overloaded `__call__`
sf = AbstractModel._static_fields + ("_call", ) sf = AbstractModel._static_fields + ("_call", )
sf = sf + (static_fields if static_fields is not _NoValue else ()) sf = sf + (static_fields if static_fields is not _NoValue else ())
super().__init__( super().__init__(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment