This repository was archived by the owner on Jul 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 137
Added support for 'isFinite', 'isInfinite', and 'isNaN'. #149
Merged
Merged
Changes from 7 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
930cf5f
Enhanced the 'matmul' wrapper so that it matches the behavior of the …
eaplatanios a557090
Added support for the 'log1mexp' op and its VJP.
eaplatanios 9e75132
Added a test.
eaplatanios 571a301
Update Sources/TensorFlow/Operators/Math.swift
eaplatanios 2131375
Removed the need for a general 'Tensor.withoutDerivative()' as Richar…
eaplatanios 1e80a1e
Addressed Richard's feedback.
eaplatanios 3b60a9e
Addressed Richard's feedback.
eaplatanios 9ef8db8
Added one more tests helper.
eaplatanios 561a842
Minor bug fix.
eaplatanios 670eabf
Merge branch 'matmul' into logm1exp
eaplatanios a01f161
Added a test for 'log1mexp'.
eaplatanios 399aba6
Merge branch 'matmul' into log-sigmoid
eaplatanios a30c098
Added support for 'softplus' and 'logSigmoid'.
eaplatanios 7b7585e
Minor tweak.
eaplatanios 6c5b2a6
Merge branch 'matmul' into is-finite
eaplatanios 102fba1
Added support for 'isFinite', 'isInfinite', and 'isNaN'.
eaplatanios 001d2de
Addressed Richard's feedback.
eaplatanios d33db18
Merged upstream changes.
eaplatanios a0384e7
Fixed some of the tests.
eaplatanios 0fbac79
Made the tests pass.
eaplatanios 9701780
Attempt at making 'log1mexp' differentiable.
eaplatanios 795e2cf
Merged upstream changes.
eaplatanios 8869b75
Merged upstream changes.
eaplatanios 2b6a5ba
Enabled the 'logSigmoid' test.
eaplatanios 12c96e8
Merged upstream changes.
eaplatanios 937e285
Merged upstream changes.
eaplatanios 550e5ec
Minor edit.
eaplatanios c6a4387
Merged upstream changes.
eaplatanios 8b79e67
Style edit.
eaplatanios File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2019 The TensorFlow Authors. All Rights Reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
import XCTest | ||
@testable import TensorFlow | ||
|
||
internal func assertEqual<T: TensorFlowScalar & Equatable>(_ x: Tensor<T>, _ y: Tensor<T>) { | ||
zip(x.scalars, y.scalars).forEach { (x, y) in | ||
XCTAssertEqual(x, y) | ||
} | ||
} | ||
|
||
internal func assertEqual<T: TensorFlowFloatingPoint>(_ x: Tensor<T>, _ y: Tensor<T>, accuracy: T) { | ||
zip(x.scalars, y.scalars).forEach { (x, y) in | ||
XCTAssertEqual(x, y, accuracy: accuracy) | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Uh oh!
There was an error while loading. Please reload this page.