Skip to content

Conversation

@dan-zheng
Copy link
Contributor

@dan-zheng dan-zheng commented Jan 30, 2019

Propagate derivative's substitution map in reapplyFunctionConversion for
partial_apply instructions. When reapplying a partial_apply instruction,
the associated derivative function's substitution map should be used, not
the original function's. This is because the derivative function may have
more generic requirements than the original function.

Revamp test/TensorFlowRuntime/model_autodiff_runtime.swift to use imported
TensorFlow high-level APIs (layers and optimizers).
This file acts as CI for tensorflow-swift-apis.

Resolves SR-9799. Exposes a new crasher: SR-9806.

@dan-zheng dan-zheng added the tensorflow This is for "tensorflow" branch PRs. label Jan 30, 2019
@dan-zheng dan-zheng requested a review from rxwei January 30, 2019 07:05
Propagate derivative's substitution map in `reapplyFunctionConversion` for
`partial_apply` instructions. When reapplying a `partial_apply` instruction,
the associated derivative function's substitution map should be used, not
the original function's. This is because the derivative function may have
more generic requirements than the original function.

Revamp `test/TensorFlowRuntime/model_autodiff_runtime.swift` to use imported
TensorFlow high-level APIs (layers and optimizers).

Resolves SR-9799.
@dan-zheng dan-zheng force-pushed the fix-differentiation-partial-apply-substs branch from 1a7d110 to f42feea Compare January 30, 2019 07:06
Address comments by @rxwei.
- Create `assocFn` without generic environment.
- Clean up substitution map logic.
  - Compute `partial_apply` substitution map using derivative generic signature.

Address comments from @slavapestov.
@dan-zheng
Copy link
Contributor Author

@swift-ci Please test tensorflow

@dan-zheng dan-zheng merged commit 569168c into swiftlang:tensorflow Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tensorflow This is for "tensorflow" branch PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants