Skip to content
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

feat: add PositiveDefinite #89

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

nicholaskl97
Copy link

A PositiveDefinite container wraps an underlying model and results in a model that returns a postive number whenever the input is nonzero (or not equal to a different point specified when defining the container). This is useful, among other applications, in neural Lyapunov applications.

@avik-pal avik-pal force-pushed the positive-definite-container branch from 0445dd8 to ebf0efe Compare January 9, 2025 15:24
"""
@concrete struct PositiveDefinite <: AbstractLuxWrapperLayer{:model}
model <: AbstractLuxLayer
x0 <: AbstractVector
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't store a vector here. Instead pass in a initialization_function (ideally from WeightInitializers.jl) and construct the vector inside initialstates

Comment on lines +110 to +111
in_val <: AbstractVector
out_val <: AbstractVector
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants