Skip to content

Enhance activations testing (#992)#1144

Open
johnn021as wants to merge 6 commits into
fortran-lang:masterfrom
johnn021as:fix/issue-992
Open

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

Conversation

@johnn021as

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).

@johnn021as johnn021as changed the title Fix/issue 992 Enhance activations testing (#992) Mar 15, 2026
@johnn021as

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

jalvesz commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

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.

@johnn021as

johnn021as commented Mar 16, 2026

Copy link
Copy Markdown
Author

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

@johnn021as johnn021as marked this pull request as ready for review March 25, 2026 05:49
@14NGiestas 14NGiestas added topic: mathematics linear algebra, sparse matrices, special functions, FFT, random numbers, statistics, ... automation Related to the workflows and automatic tests running here labels May 7, 2026
@14NGiestas 14NGiestas linked an issue May 7, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Related to the workflows and automatic tests running here topic: mathematics linear algebra, sparse matrices, special functions, FFT, random numbers, statistics, ...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance activations testing

3 participants