Add option to select activation function for ChamberSphere - #239
Add option to select activation function for ChamberSphere#239charoheijnen wants to merge 7 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.
|
@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
left a comment
There was a problem hiding this comment.
Great work, @charoheijnen! See below two comments
mrp089
left a comment
There was a problem hiding this comment.
I think SimulationParameters can be simplified. See comments.
| model, vessel_config["activation_function"], vessel_name); | ||
| model.get_block(vessel_name) | ||
| ->set_activation_function(std::move(act_func)); | ||
| } |
There was a problem hiding this comment.
Why is this extra check necessary? There is already the function create_chambers that creates an activation function for all chambers besides ChamberSphere. Can you simply add ChamberSphere to that list? Even better: If now all chambers use an activation function, the lengthy if-statement in create_chambers could be removed entirely.
| model.cardiac_cycle_period = period; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Why does this need to be moved? Maybe with the change to create_chambers that can stay where it is.
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