make everything compile on the stock toolchain #251
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes everything compile on the stock toolchain! Also everything still compiles on tensorflow-0.12 toolchain, so that you can continue working with that.
@ProfFan, let me know if it's okay for me to merge this with the tracking branch and also update the tracking branch to work with the stock toolchain. If it's okay, I'll do that next.
Note: The process for installing the stock toolchain with the required TensorFlow libraries is currently a bit complicated, so I wouldn't suggest trying it yourself yet. Soon we should have a simplified process. But if you really want to try it yourself, let me know and I can describe the process.
The required changes were:
import _Differentiationto enable differentiation@differentiableannotations on functions that are called by other@differentiablefunctions, so I added a few more@differentiableannotations.swift-models(because it doesn't compile on stock toolchains yet), and copy-paste the required code fromswift-modelsinto aModelSupportmodule.