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

Revert "Restructured the operators source files and added support for multiple new operators." #108

Merged
merged 1 commit into from
Apr 21, 2019
Merged
Show file tree
Hide file tree
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
178 changes: 0 additions & 178 deletions Sources/DeepLearning/DifferentialOperators.swift

This file was deleted.

12 changes: 2 additions & 10 deletions Sources/DeepLearning/Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,12 @@
// limitations under the License.

#if !COMPILING_TENSORFLOW_MODULE
@_exported import TensorFlow
import TensorFlow
#endif

/// Returns a tensor with the same shape and scalars as the specified tensor.
@inlinable
@differentiable
public func identity<Scalar>(_ x: Tensor<Scalar>) -> Tensor<Scalar> {
return x
}

// `pow` is defined in Darwin/Glibc on `Float` and `Double`, but there doesn't exist a generic
// version for `FloatingPoint`.
// This is a manual definition.
@inlinable
func pow<T: BinaryFloatingPoint>(_ x: T, _ y: T) -> T {
func pow<T : BinaryFloatingPoint>(_ x: T, _ y: T) -> T {
return T(pow(Double(x), Double(y)))
}
Loading