- 
                Notifications
    You must be signed in to change notification settings 
- Fork 36
Closed
Description
Lines 1139 to 1146 in 22740ed
| function returned(model::Model, parameters::NamedTuple) | |
| fixed_model = fix(model, parameters) | |
| return fixed_model() | |
| end | |
| function returned(model::Model, values, keys) | |
| return returned(model, NamedTuple{keys}(values)) | |
| end | 
NamedTuple is dangerous, as it only works for identity-lens-VarNames.
BTW, i wonder if it is a bit debatable as to whether it should really use fix? as that zeroes all logprobs. If the return value includes logprobs, then returned(model, NT) will yield zero, whereas that may not have been intended. I believe that it's safer to use InitFromParams, even if that's somewhat slower (as it has to go through the whole accumulator stuff).
Metadata
Metadata
Assignees
Labels
No labels