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

Commit

Permalink
turn off reshape layer for v0.2 (it crashes the stdlib compile)
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Rasi committed Feb 28, 2019
1 parent 6f5b962 commit 34573a2
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions Sources/DeepLearning/Layer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -620,21 +620,3 @@ public struct Flatten<Scalar: TensorFlowFloatingPoint>: Layer {
return input.reshaped(to: [batchSize, remaining])
}
}

@_fixed_layout
public struct Reshape<Scalar: TensorFlowFloatingPoint>: Layer {
@noDerivative public let shape: Tensor<Int32>

public init(shape: Tensor<Int32>) {
self.shape = shape
}

public init(_ shape: TensorShape) {
self.init(shape: Tensor(shape.dimensions))
}

@differentiable
public func applied(to input: Tensor<Scalar>, in _: Context) -> Tensor<Scalar> {
return input.reshaped(toShape: shape)
}
}

0 comments on commit 34573a2

Please sign in to comment.