Skip to content

Enhance activations testing (#992)#1144

Open
learner0018 wants to merge 6 commits intofortran-lang:masterfrom
learner0018:fix/issue-992
Open

Enhance activations testing (#992)#1144
learner0018 wants to merge 6 commits intofortran-lang:masterfrom
learner0018:fix/issue-992

Conversation

@learner0018
Copy link
Copy Markdown

Implements testing framework for activation functions using reference data generated by PyTorch.

Changes:

  • Added generate_activation_data.py to generate .npy reference files for sigmoid, relu, tanh, elu, selu, softplus, and softsign.
  • Draft implementation of unit tests in test_specialfunctions_activations.fypp using test-drive.

Current Status:
As discussed in #992, I am encountering a build error linking stdlib_io to the test executable.
Opening this as a Draft to get help with the CMake configuration.

Reference data files generated locally (ignored by git).

@learner0018 learner0018 changed the title Fix/issue 992 Enhance activations testing (#992) Mar 15, 2026
@learner0018
Copy link
Copy Markdown
Author

Hi @jalvesz,
I have pushed the updates to integrate the testing framework directly into test_specialfunctions_activations.fypp using test-drive as discussed in the issue.
Key changes implemented:
1 CMakeFix: I added stdlib_io to the dependencies in test/specialfunctions/CMakeLists.txt to resolve the module visibility issue.
2 Test Logic: Implemented the initial test subroutines in test_specialfunctions_activations.fypp.
3 Python Script: Created generate_activation_data.py to handle the reference data generation.

Looking forward to your feedback

@jalvesz
Copy link
Copy Markdown
Contributor

jalvesz commented Mar 15, 2026

before reveiwing, could you please first remove unrelated changes: the app folder seems to be something coming from local testing, please revert this. Also, the .f90 file in the src folder should not be tracked here, it is a file created by the fypp preprocessor.

@learner0018
Copy link
Copy Markdown
Author

learner0018 commented Mar 16, 2026

understood. i will remove the app folder and the generated .f90 file immediately. thanks for the guidance.

@learner0018 learner0018 marked this pull request as ready for review March 25, 2026 05:49
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