Skip to content
This repository has been archived by the owner on Jul 1, 2023. It is now read-only.

Confusing compiler diagnostics: generic parameter 'Self' could not be inferred #895

Open
ematejska opened this issue Apr 28, 2020 · 1 comment

Comments

@ematejska
Copy link
Contributor

Imported from JIRA, filed by Brennan Saeta https://bugs.swift.org/browse/TF-313

There is a confusing compiler error message when compiling the code at: d6fe358

saeta@saeta:~/src/s4tf/tensorflow-swift-apis$ swift test
Compile Swift Module 'DeepLearning' (8 sources)
/home/saeta/src/s4tf/tensorflow-swift-apis/Sources/DeepLearning/Trainer.swift:35:37: error: generic parameter 'Self' could not be inferred
            optimizer.update(&model.allDifferentiableVariables, along: {grad}model)

The problem is that {{

{grad}
model}} is of the wrong type, and does not correspond

@ematejska
Copy link
Contributor Author

Related to: TF-299 Pre-built supervised training loops

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

No branches or pull requests

1 participant