Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions test/trainable_engine_test_m.F90
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,16 @@ function xor_gate_with_random_weights() result(test_passes)
type(trainable_engine_t) trainable_engine
real(rkind), parameter :: tolerance = 1.E-02_rkind
real(rkind), allocatable :: harvest(:,:,:)
#ifndef __INTEL_COMPILER
#ifdef __flang__
!! Reducing num_iterations yields a less robust test, but moving away from local minima by
!! increasing num_iterations causes this test to crash when compiled with the flang or ifx compilers.
integer, parameter :: num_inputs=2, mini_batch_size = 1, num_iterations=50000
#elif defined __INTEL_COMPILER
integer, parameter :: num_inputs=2, mini_batch_size = 1, num_iterations=49000
#else
integer, parameter :: num_inputs=2, mini_batch_size = 1, num_iterations=500000
!! Depending on where in the random-number sequence the weights start, this test can pass for lower
!! numbers of iterations, e.g., 400000. Using more iterations gives more robust convergence.
#else
integer, parameter :: num_inputs=2, mini_batch_size = 1, num_iterations=49000
!! Reducing num_iterations yields a less robust test, but increasing num_iterations causes this
!! test to crash when compiled with the Intel ifx compiler.
#endif
integer batch, iter

Expand Down