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

Fix TensorFlow stdlib module compilation. #546

Merged
merged 1 commit into from
Nov 7, 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
2 changes: 2 additions & 0 deletions Sources/TensorFlow/Context.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import Darwin
import Glibc
#endif

#if !COMPILING_TENSORFLOW_STDLIB_MODULE
import Tensor
#endif

/// A value that indicates the phase of using a machine learning model.
public enum LearningPhase {
Expand Down
2 changes: 2 additions & 0 deletions Sources/TensorFlow/Exports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if !COMPILING_TENSORFLOW_STDLIB_MODULE
// Re-export all public symbols in the Tensor library.
@_exported import Tensor
#endif
2 changes: 2 additions & 0 deletions Sources/TensorFlow/Initializers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if !COMPILING_TENSORFLOW_STDLIB_MODULE
import Tensor
#endif

public extension Tensor {
/// Creates a tensor with the specified shape and a single, repeated scalar value.
Expand Down
2 changes: 2 additions & 0 deletions Sources/TensorFlow/Layers/Initialization.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if !COMPILING_TENSORFLOW_STDLIB_MODULE
import Tensor
#endif

public typealias ParameterInitializer<Scalar: TensorFlowScalar> = (TensorShape) -> Tensor<Scalar>

Expand Down
2 changes: 2 additions & 0 deletions Sources/TensorFlow/Layers/Recurrent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#if !COMPILING_TENSORFLOW_STDLIB_MODULE
import Tensor
#endif

/// An input to a recurrent neural network.
public struct RNNCellInput<Input: Differentiable, State: Differentiable>: Differentiable {
Expand Down