Add option to select activation function for ChamberSphere - #239
Open
charoheijnen wants to merge 4 commits into
Open
Add option to select activation function for ChamberSphere#239charoheijnen wants to merge 4 commits into
charoheijnen wants to merge 4 commits into
Conversation
…y of activation funcitons. Added double_tanh activation funciton to activation function file. Changed chamver_sphere.json test case to be able to choose activaiton function. when double_tanh activation funciton was selected test case runs as previously ran.
Member
|
@charoheijnen, it looks like the GUI test is throwing an error:
I think the fix is to bump this up to 24 (or avoid setting a version altogether): svZeroDSolver/.github/workflows/gui.yml Line 22 in ce68a7c |
mrp089
requested changes
Jul 24, 2026
mrp089
left a comment
Member
There was a problem hiding this comment.
Great work, @charoheijnen! See below two comments
| generate_block(model, vessel_values, vessel_type, vessel_name); | ||
|
|
||
| // Create and set activation_function for vessel types that use one | ||
| if (vessel_type == "ChamberSphere") { |
Member
There was a problem hiding this comment.
Does the ChamberElastance block not also use an activation function? Could this be done more elegantly by introducing a block flag like has_activation_function?
|
|
||
| // Create and set activation_function for vessel types that use one | ||
| if (vessel_type == "ChamberSphere") { | ||
| auto act_func = generate_activation_function( |
Member
There was a problem hiding this comment.
Adapt error message of generate_activation_function to also include the new one
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add option to select activation function for ChamberSphere
Current situation
Currently activation function is hard coded within ChamberSphere. As detailed in #236
Release Notes
Testing
Code of Conduct & Contributing Guidelines