{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/swift-apis/issues/596","repository_url":"https://api.github.com/repos/tensorflow/swift-apis","labels_url":"https://api.github.com/repos/tensorflow/swift-apis/issues/596/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/swift-apis/issues/596/comments","events_url":"https://api.github.com/repos/tensorflow/swift-apis/issues/596/events","html_url":"https://github.com/tensorflow/swift-apis/issues/596","id":541979364,"node_id":"MDU6SXNzdWU1NDE5NzkzNjQ=","number":596,"title":"Make conv2DBackpropInput public","user":{"login":"t-ae","id":12446914,"node_id":"MDQ6VXNlcjEyNDQ2OTE0","avatar_url":"https://avatars1.githubusercontent.com/u/12446914?v=4","gravatar_id":"","url":"https://api.github.com/users/t-ae","html_url":"https://github.com/t-ae","followers_url":"https://api.github.com/users/t-ae/followers","following_url":"https://api.github.com/users/t-ae/following{/other_user}","gists_url":"https://api.github.com/users/t-ae/gists{/gist_id}","starred_url":"https://api.github.com/users/t-ae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/t-ae/subscriptions","organizations_url":"https://api.github.com/users/t-ae/orgs","repos_url":"https://api.github.com/users/t-ae/repos","events_url":"https://api.github.com/users/t-ae/events{/privacy}","received_events_url":"https://api.github.com/users/t-ae/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"assignees":[{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2019-12-24T03:53:29Z","updated_at":"2020-01-10T15:55:26Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"`Conv*D` layers have corresponding public functions `conv*D`.\r\nWith them we can easily create customized convolutional layers.\r\n\r\nOn the other hand, `TansposedConv*D` is implemented with internal function `conv2DBackpropInput`.\r\nIt makes creating customized transposed convolutional layers hard.\r\n\r\nI propose to make it public, or add new `transposedConv2D` function as alias."},"comment":{"url":"https://api.github.com/repos/tensorflow/swift-apis/issues/comments/573092772","html_url":"https://github.com/tensorflow/swift-apis/issues/596#issuecomment-573092772","issue_url":"https://api.github.com/repos/tensorflow/swift-apis/issues/596","id":573092772,"node_id":"MDEyOklzc3VlQ29tbWVudDU3MzA5Mjc3Mg==","user":{"login":"dan-zheng","id":5590046,"node_id":"MDQ6VXNlcjU1OTAwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/5590046?v=4","gravatar_id":"","url":"https://api.github.com/users/dan-zheng","html_url":"https://github.com/dan-zheng","followers_url":"https://api.github.com/users/dan-zheng/followers","following_url":"https://api.github.com/users/dan-zheng/following{/other_user}","gists_url":"https://api.github.com/users/dan-zheng/gists{/gist_id}","starred_url":"https://api.github.com/users/dan-zheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan-zheng/subscriptions","organizations_url":"https://api.github.com/users/dan-zheng/orgs","repos_url":"https://api.github.com/users/dan-zheng/repos","events_url":"https://api.github.com/users/dan-zheng/events{/privacy}","received_events_url":"https://api.github.com/users/dan-zheng/received_events","type":"User","site_admin":false},"created_at":"2020-01-10T15:55:26Z","updated_at":"2020-01-10T15:55:26Z","author_association":"MEMBER","body":"Sorry for the late reply. I think renaming `conv2DBackpropInput` and making it a public API is reasonable!\r\n\r\n---\r\n\r\n[`func matmul`](https://github.com/tensorflow/swift-apis/blob/c7afd2dc7c55735e8449256e6e3efc11f6dc5576/Sources/TensorFlow/Operators/Math.swift#L2774) has `transposed: Bool` arguments for transposing `lhs` or `rhs`:\r\n```swift\r\n/// Performs matrix multiplication with another tensor and produces the result.\r\n@inlinable\r\n@differentiable(where Scalar: TensorFlowFloatingPoint)\r\npublic func matmul<Scalar: Numeric>(\r\n    _ lhs: Tensor<Scalar>,\r\n    transposed transposeLhs: Bool = false,\r\n    _ rhs: Tensor<Scalar>,\r\n    transposed transposeRhs: Bool = false\r\n) -> Tensor<Scalar> {\r\n    precondition(lhs.rank >= 2, \"Input tensors must have at least rank 2\")\r\n    precondition(rhs.rank >= 2, \"Input tensors must have at least rank 2\")\r\n    if lhs.rank > 2 || rhs.rank > 2 {\r\n        // TODO(TF-629): Conjugate to make compatible with the adjoint.\r\n        return _Raw.batchMatMulV2(lhs, rhs, adjX: transposeLhs, adjY: transposeRhs)\r\n    }\r\n    return _Raw.matMul(lhs, rhs, transposeA: transposeLhs, transposeB: transposeRhs)\r\n}\r\n```\r\n\r\nAdding a `transposed: Bool = false` argument (or arguments, for both input and filter?) to the existing function `public func conv2D` sounds ideal to me, if possible. @t-ae: would you be interested in looking into this?\r\n\r\nIncreasing the API surface area with `public func transposedConv2D` is less desirable."}}
{"actor":{"display_login":"dan-zheng"}}