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

Remove APIs that were deprecated in 0.5. #516

Merged
merged 1 commit into from
Sep 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 0 additions & 96 deletions Sources/TensorFlow/BackwardsCompatibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,99 +146,3 @@ public func sigmoidCrossEntropy<Scalar: TensorFlowFloatingPoint>(
) -> Tensor<Scalar> {
sigmoidCrossEntropy(logits: logits, labels:labels, reduction: _mean)
}

//===------------------------------------------------------------------------------------------===//
// Tensor comparison operators
//===------------------------------------------------------------------------------------------===//

extension Tensor where Scalar: Numeric & Comparable {
/// Returns a Boolean value indicating whether the results of element-wise comparison
/// `lhs .< rhs` are all `true`.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .< rhs).all()` instead.
""")
public static func < (lhs: Tensor, rhs: Tensor) -> Bool {
return (lhs .< rhs).all()
}

/// Returns a Boolean value indicating whether the results of element-wise comparison
/// `lhs .<= rhs` are all `true`.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .<= rhs).all()` instead.
""")
public static func <= (lhs: Tensor, rhs: Tensor) -> Bool {
return (lhs .<= rhs).all()
}

/// Returns a Boolean value indicating whether the results of element-wise comparison
/// `lhs .> rhs` are all `true`.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .> rhs).all()` instead.
""")
public static func > (lhs: Tensor, rhs: Tensor) -> Bool {
return (lhs .> rhs).all()
}

/// Returns a Boolean value indicating whether the results of element-wise comparison
/// `lhs .>= rhs` are all `true`.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .>= rhs).all()` instead.
""")
public static func >= (lhs: Tensor, rhs: Tensor) -> Bool {
return (lhs .>= rhs).all()
}
}

public extension Tensor where Scalar: Numeric & Comparable {
/// Returns a Boolean value indicating whether all scalars in the first argument are less than
/// the second argument.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .< rhs).all()` instead.
""")
static func < (lhs: Tensor, rhs: Scalar) -> Bool {
return (lhs .< rhs).all()
}

/// Returns a Boolean value indicating whether all scalars in the first argument are less than
/// or equal to the second argument.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .<= rhs).all()` instead.
""")
static func <= (lhs: Tensor, rhs: Scalar) -> Bool {
return (lhs .<= rhs).all()
}

/// Returns a Boolean value indicating whether all scalars in the first argument are greater than
/// the second argument.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .> rhs).all()` instead.
""")
static func > (lhs: Tensor, rhs: Scalar) -> Bool {
return (lhs .> rhs).all()
}

/// Returns a Boolean value indicating whether all scalars in the first argument are greater than
/// or equal to the second argument.
@inlinable
@available(*, deprecated, message: """
This API will be removed after Swift for TensorFlow 0.5.
Use `(lhs .>= rhs).all()` instead.
""")
static func >= (lhs: Tensor, rhs: Scalar) -> Bool {
return (lhs .>= rhs).all()
}
}