-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
additional cases for #122 #136
base: main
Are you sure you want to change the base?
Conversation
davidkoski
commented
Sep 12, 2024
- add axis parameter to Softmax, LogSoftmax
- deprecates SoftMax and replaces with Softmax (missed in earlier renaming)
- add axis parameter to Softmax, LogSoftmax - deprecates SoftMax and replaces with Softmax (missed in earlier renaming)
@@ -458,6 +458,14 @@ open class ReLU6: Module, UnaryLayer { | |||
} | |||
} | |||
|
|||
@available(*, deprecated, renamed: "Softmax") | |||
@_documentation(visibility:internal) | |||
open class SoftMax: Module, UnaryLayer { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I missed this one earlier -- this redirects it to be named Softmax
|
||
public init(axis: Int = -1) { | ||
self.axis = axis | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GLU already had this (exposed axis parameter) and the original request was to add negative slope. This just exposes axis on Softmax and LogSoftmax.
@@ -347,7 +347,7 @@ public func hardSwish(_ x: MLXArray) -> MLXArray { | |||
/// - <doc:activations> | |||
/// - ``glu(_:axis:)`` | |||
open class GLU: Module, UnaryLayer { | |||
public let axis: Int | |||
public var axis: Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to var for consistency