Skip to content

mod_cost_epoch

Lines: 355 | Visibility: private

Routines helpful for calculating and reporting cost function values during training. author: Alexander Knoll

Dependencies

Uses

module~~mod_cost_epoch~~UsesGraph module~mod_cost_epoch mod_cost_epoch ieee_arithmetic ieee_arithmetic module~mod_cost_epoch->ieee_arithmetic mod_property_list mod_property_list module~mod_cost_epoch->mod_property_list module~mod_committee_helper mod_committee_helper module~mod_cost_epoch->module~mod_committee_helper module~mod_dataset_storage mod_dataset_storage module~mod_cost_epoch->module~mod_dataset_storage module~mod_decorations mod_decorations module~mod_cost_epoch->module~mod_decorations module~mod_io mod_io module~mod_cost_epoch->module~mod_io module~mod_loss_abstract mod_loss_abstract module~mod_cost_epoch->module~mod_loss_abstract module~mod_mpi mod_mpi module~mod_cost_epoch->module~mod_mpi module~mod_periodic_table mod_periodic_table module~mod_cost_epoch->module~mod_periodic_table module~mod_precision mod_precision module~mod_cost_epoch->module~mod_precision module~mod_set_integer mod_set_integer module~mod_cost_epoch->module~mod_set_integer module~mod_throw mod_throw module~mod_cost_epoch->module~mod_throw module~mod_timer mod_timer module~mod_cost_epoch->module~mod_timer module~mod_committee_helper->module~mod_io module~mod_settings mod_settings module~mod_committee_helper->module~mod_settings module~mod_dataset_storage->mod_property_list module~mod_dataset_storage->module~mod_mpi module~mod_sort mod_sort module~mod_dataset_storage->module~mod_sort module~mod_storage_container mod_storage_container module~mod_dataset_storage->module~mod_storage_container module~mod_decorations->module~mod_io module~mod_decorations->module~mod_precision module~mod_decorations->module~mod_throw module~mod_io->module~mod_precision iso_fortran_env iso_fortran_env module~mod_io->iso_fortran_env module~mod_optional_args mod_optional_args module~mod_io->module~mod_optional_args module~mod_loss_abstract->module~mod_mpi module~mod_loss_abstract->module~mod_precision module~mod_mpi->module~mod_precision mpi_f08 mpi_f08 module~mod_mpi->mpi_f08 module~mod_periodic_table->module~mod_io module~mod_periodic_table->module~mod_precision module~mod_periodic_table->module~mod_throw module~mod_array_helpers mod_array_helpers module~mod_periodic_table->module~mod_array_helpers module~mod_constants mod_constants module~mod_periodic_table->module~mod_constants iso_c_binding iso_c_binding module~mod_precision->iso_c_binding module~mod_precision->iso_fortran_env module~mod_set_integer->module~mod_throw module~mod_throw->module~mod_io module~mod_throw->module~mod_mpi module~mod_throw->module~mod_precision module~mod_throw->iso_c_binding module~mod_throw->iso_fortran_env module~mod_throw->module~mod_sort module~mod_timer->ieee_arithmetic module~mod_timer->module~mod_io module~mod_timer->module~mod_precision module~mod_timer->module~mod_throw module~mod_timer->module~mod_optional_args module~mod_array_helpers->module~mod_precision module~mod_array_helpers->module~mod_throw module~mod_constants->module~mod_precision module~mod_constants->iso_c_binding module~mod_settings->module~mod_io module~mod_settings->module~mod_periodic_table module~mod_settings->module~mod_precision module~mod_settings->module~mod_throw module~mod_settings->module~mod_constants module~mod_cpu_vendor mod_cpu_vendor module~mod_settings->module~mod_cpu_vendor module~mod_sort->module~mod_precision module~mod_storage_container->mod_property_list module~mod_storage_container->module~mod_io module~mod_storage_container->module~mod_mpi module~mod_storage_container->module~mod_sort module~mod_abstract_property_list mod_abstract_property_list module~mod_storage_container->module~mod_abstract_property_list module~mod_dynamic_int_array mod_dynamic_int_array module~mod_storage_container->module~mod_dynamic_int_array module~mod_string mod_string module~mod_storage_container->module~mod_string module~mod_abstract_property_list->module~mod_mpi module~mod_abstract_property_list->module~mod_throw module~mod_abstract_property_list->module~mod_optional_args module~mod_abstract_property_list->module~mod_dynamic_int_array module~mod_abstract_property_list->module~mod_string module~mod_dynamic_int_array_2d mod_dynamic_int_array_2d module~mod_abstract_property_list->module~mod_dynamic_int_array_2d module~mod_dynamic_string_array mod_dynamic_string_array module~mod_abstract_property_list->module~mod_dynamic_string_array module~mod_cpu_vendor->iso_c_binding module~mod_string->module~mod_precision module~mod_dynamic_int_array_2d->module~mod_mpi module~mod_dynamic_string_array->module~mod_string

Used By

module~~mod_cost_epoch~~UsedByGraph module~mod_cost_epoch mod_cost_epoch module~mod_cost_calculator mod_cost_calculator module~mod_cost_calculator->module~mod_cost_epoch module~mod_write_outfiles_training mod_write_outfiles_training module~mod_cost_calculator->module~mod_write_outfiles_training module~mod_dataset_statistics_chi_all_chunks mod_dataset_statistics_chi_all_chunks module~mod_dataset_statistics_chi_all_chunks->module~mod_cost_epoch module~mod_feature_map_scaling_all_chunks mod_feature_map_scaling_all_chunks module~mod_feature_map_scaling_all_chunks->module~mod_cost_epoch module~mod_train_loop_4g_charges mod_train_loop_4g_charges module~mod_train_loop_4g_charges->module~mod_cost_epoch module~mod_train_loop_4g_charges->module~mod_cost_calculator module~mod_output_files_and_cost_4g_charges mod_output_files_and_cost_4g_charges module~mod_train_loop_4g_charges->module~mod_output_files_and_cost_4g_charges module~mod_train_loop_atomic_property mod_train_loop_atomic_property module~mod_train_loop_atomic_property->module~mod_cost_epoch module~mod_train_loop_atomic_property->module~mod_cost_calculator module~mod_output_files_and_cost mod_output_files_and_cost module~mod_train_loop_atomic_property->module~mod_output_files_and_cost module~mod_train_loop_short_range mod_train_loop_short_range module~mod_train_loop_short_range->module~mod_cost_epoch module~mod_train_loop_short_range->module~mod_cost_calculator module~mod_train_loop_short_range->module~mod_output_files_and_cost module~mod_output_files_and_cost_4g_short_range mod_output_files_and_cost_4g_short_range module~mod_train_loop_short_range->module~mod_output_files_and_cost_4g_short_range module~mod_train_mode mod_train_mode module~mod_train_mode->module~mod_cost_epoch module~mod_train_mode->module~mod_dataset_statistics_chi_all_chunks module~mod_train_mode->module~mod_feature_map_scaling_all_chunks module~mod_train_mode->module~mod_train_loop_4g_charges module~mod_train_mode->module~mod_train_loop_atomic_property module~mod_train_mode->module~mod_train_loop_short_range module~mod_train_test_split mod_train_test_split module~mod_train_mode->module~mod_train_test_split module~mod_train_mode->module~mod_write_outfiles_training module~mod_train_test_split->module~mod_cost_epoch module~mod_write_outfiles_training->module~mod_cost_epoch module~mod_output_files_and_cost->module~mod_cost_calculator module~mod_output_files_and_cost_4g_charges->module~mod_cost_calculator module~mod_output_files_and_cost_4g_short_range->module~mod_cost_calculator module~mod_precompute_features_all_chunks mod_precompute_features_all_chunks module~mod_precompute_features_all_chunks->module~mod_train_test_split program~runner RuNNer program~runner->module~mod_train_mode program~runner->module~mod_precompute_features_all_chunks

Module Variables

  • TRAIN : integer– Parameter to specify the training dataset.
  • TEST : integer– Parameter to specify the test dataset.

Procedures Summary

Name Type Description
get_cost_for_checking_opt_epoch Function Extracts the cost used to check for the optimal epoch. This can be from either the training or...
separate_structure_and_atom_properties Subroutine Determines the indices and sizes of all properties to be evaluated. This routine inspects the...
calculate_cost_all_properties_epoch Subroutine Calculates the cost for all specified properties, cost functions, and committee members. This...
sum_up_contributions Subroutine
print_epoch_line_start Subroutine Prints the header for a line of cost values. This includes the cost function name, epoch, and...
print_cost_values_epoch Subroutine Prints the calculated training and test cost values for an epoch to standard output.
print_num_updates_to_stdout Subroutine Prints the number of weight updates for all committee members and properties to STDOUT. The...
print_epoch_timing_to_stdout Subroutine Prints the walltime elapsed since the last call to this routine. This is intended to time the...

Procedure Details

function get_cost_for_checking_opt_epoch

function get_cost_for_checking_opt_epoch( &
    optimal_epoch_cost_function_index, &
    optimal_epoch_property_index, &
    loptimal_epoch_train, &
    train_cost, &
    test_cost &
)

Extracts the cost used to check for the optimal epoch.

This can be from either the training or test set for a specific property and cost function.

Arguments

  • optimal_epoch_cost_function_index : integer [in]– The index of the cost function used for determining the optimal epoch.
  • optimal_epoch_property_index : integer [in]– The index of the property used for determining the optimal epoch.
  • loptimal_epoch_train : logical [in]– If true, use the training cost; otherwise, use the test cost.
  • train_cost : real(DP) (dim: (:,:,:)) [in]– The full array of training costs.
  • test_cost : real(DP) (dim: (:,:,:)) [in]– The full array of test costs.

Called By

proc~~get_cost_for_checking_opt_epoch~~CalledByGraph proc~get_cost_for_checking_opt_epoch mod_cost_epoch::get_cost_for_checking_opt_epoch proc~report_cost_epoch mod_cost_calculator::CostCalculator%report_cost_epoch proc~report_cost_epoch->proc~get_cost_for_checking_opt_epoch proc~output_files_and_cost mod_output_files_and_cost::output_files_and_cost proc~output_files_and_cost->proc~report_cost_epoch proc~output_files_and_cost_4g_charges mod_output_files_and_cost_4g_charges::output_files_and_cost_4g_charges proc~output_files_and_cost_4g_charges->proc~report_cost_epoch proc~output_files_and_cost_4g_short_range mod_output_files_and_cost_4g_short_range::output_files_and_cost_4g_short_range proc~output_files_and_cost_4g_short_range->proc~report_cost_epoch proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~output_files_and_cost_4g_charges proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~output_files_and_cost proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~output_files_and_cost proc~train_loop_short_range->proc~output_files_and_cost_4g_short_range proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode

subroutine separate_structure_and_atom_properties

subroutine separate_structure_and_atom_properties( &
    num_properties, &
    committee_size, &
    tag_to_sum, &
    property_type, &
    results_pred, &
    results_ref, &
    max_nrows_structure_properties, &
    max_nrows_atom_properties, &
    nrows_props &
)

Determines the indices and sizes of all properties to be evaluated. This routine inspects the property names and types to figure out their indices within the DatasetStorage objects and determines the maximum number of rows for structure- and atom-based properties, respectively.

Arguments

  • num_properties : integer [in]– The total number of properties to process.
  • committee_size : integer [in]– The number of committee members.
  • tag_to_sum : integer (dim: (num_properties)) [in]– For each property, the tag that should be looked up in the given reference, prediction, and fixed results classes.
  • property_type : character (dim: (num_properties)) [in]– The type of each property, either "structure" or "atom".
  • results_pred : type(DatasetStorage) (dim: (:)) [inout]– The storage for predicted results for each committee member.
  • results_ref : type(DatasetStorage) [in]– The storage for reference results.
  • max_nrows_structure_properties : integer [out]– On exit, the maximum number of rows among all structure properties.
  • max_nrows_atom_properties : integer [out]– On exit, the maximum number of rows among all atom properties.
  • nrows_props : integer (dim: (num_properties)) [out]– On exit, the number of rows for each individual property.

Called By

proc~~separate_structure_and_atom_properties~~CalledByGraph proc~separate_structure_and_atom_properties mod_cost_epoch::separate_structure_and_atom_properties proc~report_cost_epoch mod_cost_calculator::CostCalculator%report_cost_epoch proc~report_cost_epoch->proc~separate_structure_and_atom_properties proc~output_files_and_cost mod_output_files_and_cost::output_files_and_cost proc~output_files_and_cost->proc~report_cost_epoch proc~output_files_and_cost_4g_charges mod_output_files_and_cost_4g_charges::output_files_and_cost_4g_charges proc~output_files_and_cost_4g_charges->proc~report_cost_epoch proc~output_files_and_cost_4g_short_range mod_output_files_and_cost_4g_short_range::output_files_and_cost_4g_short_range proc~output_files_and_cost_4g_short_range->proc~report_cost_epoch proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~output_files_and_cost_4g_charges proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~output_files_and_cost proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~output_files_and_cost proc~train_loop_short_range->proc~output_files_and_cost_4g_short_range proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode

subroutine calculate_cost_all_properties_epoch

subroutine calculate_cost_all_properties_epoch( &
    num_properties, &
    committee_size, &
    results_pred, &
    results_ref, &
    tag_to_sum, &
    lhas_test_set, &
    train_atom_id_on_process_across_chunks_pred, &
    test_atom_id_on_process_across_chunks_pred, &
    train_atom_id_on_process_across_chunks_ref, &
    test_atom_id_on_process_across_chunks_ref, &
    train_struc_id_on_process_across_chunks_pred, &
    test_struc_id_on_process_across_chunks_pred, &
    train_struc_id_on_process_across_chunks_ref, &
    test_struc_id_on_process_across_chunks_ref, &
    property_type, &
    lproperty_per_atom, &
    use_comm_ref, &
    ladd_precomputed_contributions, &
    max_nrows_structure_properties, &
    max_nrows_atom_properties, &
    nrows_props, &
    cost_functions, &
    train_cost, &
    test_cost, &
    train_cost_element, &
    test_cost_element, &
    lcost_element, &
    results_precomputed &
)

Calculates the cost for all specified properties, cost functions, and committee members.

This routine orchestrates the main calculation for an epoch. It gathers all necessary predicted and reference data into flat arrays and then invokes the specified cost functions to compute the training and test errors.

Arguments

  • num_properties : integer [in]– The total number of properties to process.
  • committee_size : integer [in]– The number of committee members.
  • results_pred : type(DatasetStorage) (dim: (committee_size)) [in]– Storage for predicted results for each committee member.
  • results_ref : type(DatasetStorage) [in]– Storage for reference results.
  • tag_to_sum : integer (dim: (num_properties)) [in]– The tags identifying the columns that are summed up for each property. The same tags are used for all types of properties.
  • lhas_test_set : logical [in]– True if a test set is present.
  • train_atom_id_on_process_across_chunks_pred : integer (dim: (:)) [in]– Global indices of training atoms for predictions on this process.
  • test_atom_id_on_process_across_chunks_pred : integer (dim: (:)) [in]– Global indices of test atoms for predictions on this process.
  • train_atom_id_on_process_across_chunks_ref : integer (dim: (:)) [in]– Global indices of training atoms for reference on this process. These differ from the predicted atom indices, because we only store the reference values on the root MPI process.
  • test_atom_id_on_process_across_chunks_ref : integer (dim: (:)) [in]– Global indices of test atoms for reference on this process.
  • train_struc_id_on_process_across_chunks_pred : integer (dim: (:)) [in]– Global indices of training structures for predictions on this process.
  • test_struc_id_on_process_across_chunks_pred : integer (dim: (:)) [in]– Global indices of test structures for predictions on this process.
  • train_struc_id_on_process_across_chunks_ref : integer (dim: (:)) [in]– Global indices of training structures for reference on this process.
  • test_struc_id_on_process_across_chunks_ref : integer (dim: (:)) [in]– Global indices of test structures for reference on this process.
  • property_type : character (dim: (num_properties)) [in]– The type of each property, either "structure" or "atom".
  • lproperty_per_atom : logical (dim: (num_properties)) [in]– If true for a property, its values are divided by the number of atoms.
  • use_comm_ref : logical (dim: (num_properties)) [in]– If true, committee-specific reference values will be used.
  • ladd_precomputed_contributions : logical [in]– If true, add values from other tagged properties to the prediction.
  • max_nrows_structure_properties : integer [in]– The maximum number of rows among all structure properties.
  • max_nrows_atom_properties : integer [in]– The maximum number of rows among all atom properties.
  • nrows_props : integer (dim: (num_properties)) [in]– The number of rows for each individual property.
  • cost_functions : type(LossFunctionPtr) (dim: (:)) [inout]– Array of cost function objects to be evaluated.
  • train_cost : real(DP) (dim: (size(cost_functions),committee_size,num_properties)) [out]– On exit, the calculated training cost for each cost function, committee, and property.
  • test_cost : real(DP) (dim: (size(cost_functions),committee_size,num_properties)) [out]– On exit, the calculated test cost for each cost function, committee, and property.
  • train_cost_element : real(DP) (dim: (size(cost_functions),committee_size,num_properties,MAX_ELEM_NUM)) [out]– On exit, the calculated training cost for each cost function, committee, and property element resolved.
  • test_cost_element : real(DP) (dim: (size(cost_functions),committee_size,num_properties,MAX_ELEM_NUM)) [out]– On exit, the calculated test cost for each cost function, committee, and property element resolved.
  • lcost_element : logical [in]– Whether to calculate element resolved cost.
  • results_precomputed : type(DatasetStorage) (dim: (committee_size)) [in]– Container storing values of precomputed properties.

Called By

proc~~calculate_cost_all_properties_epoch~~CalledByGraph proc~calculate_cost_all_properties_epoch mod_cost_epoch::calculate_cost_all_properties_epoch proc~report_cost_epoch mod_cost_calculator::CostCalculator%report_cost_epoch proc~report_cost_epoch->proc~calculate_cost_all_properties_epoch proc~output_files_and_cost mod_output_files_and_cost::output_files_and_cost proc~output_files_and_cost->proc~report_cost_epoch proc~output_files_and_cost_4g_charges mod_output_files_and_cost_4g_charges::output_files_and_cost_4g_charges proc~output_files_and_cost_4g_charges->proc~report_cost_epoch proc~output_files_and_cost_4g_short_range mod_output_files_and_cost_4g_short_range::output_files_and_cost_4g_short_range proc~output_files_and_cost_4g_short_range->proc~report_cost_epoch proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~output_files_and_cost_4g_charges proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~output_files_and_cost proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~output_files_and_cost proc~train_loop_short_range->proc~output_files_and_cost_4g_short_range proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode

subroutine sum_up_contributions

subroutine sum_up_contributions( &
    contrib_indices, &
    nrows, &
    sample_indices_on_process, &
    prop_list, &
    luse_comm_name, &
    committee_idx, &
    sum &
)

Arguments

  • contrib_indices : integer (dim: (:)) [in]
  • nrows : integer [in]
  • sample_indices_on_process : integer (dim: (:)) [in]
  • prop_list : type(PropertyListReal) [in]
  • luse_comm_name : logical [in]
  • committee_idx : integer [in]
  • sum : real(DP) (dim: (nrows,size(sample_indices_on_process))) [inout]

Called By

proc~~sum_up_contributions~~CalledByGraph proc~sum_up_contributions mod_cost_epoch::sum_up_contributions proc~calculate_cost_all_properties_epoch mod_cost_epoch::calculate_cost_all_properties_epoch proc~calculate_cost_all_properties_epoch->proc~sum_up_contributions proc~report_cost_epoch mod_cost_calculator::CostCalculator%report_cost_epoch proc~report_cost_epoch->proc~calculate_cost_all_properties_epoch proc~output_files_and_cost mod_output_files_and_cost::output_files_and_cost proc~output_files_and_cost->proc~report_cost_epoch proc~output_files_and_cost_4g_charges mod_output_files_and_cost_4g_charges::output_files_and_cost_4g_charges proc~output_files_and_cost_4g_charges->proc~report_cost_epoch proc~output_files_and_cost_4g_short_range mod_output_files_and_cost_4g_short_range::output_files_and_cost_4g_short_range proc~output_files_and_cost_4g_short_range->proc~report_cost_epoch proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~output_files_and_cost_4g_charges proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~output_files_and_cost proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~output_files_and_cost proc~train_loop_short_range->proc~output_files_and_cost_4g_short_range proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode

subroutine print_epoch_line_start

subroutine print_epoch_line_start( &
    cost_function, &
    epoch, &
    committee_idx &
)

Prints the header for a line of cost values.

This includes the cost function name, epoch, and committee index. Example: "RMSE [epoch] [comm_idx]"

Arguments

  • cost_function : type(LossFunctionPtr) [in]– The cost function object, used to retrieve the name.
  • epoch : integer [in]– The current epoch index.
  • committee_idx : integer [in]– The current committee member index.

Called By

proc~~print_epoch_line_start~~CalledByGraph proc~print_epoch_line_start mod_cost_epoch::print_epoch_line_start proc~print_cost_values_epoch mod_cost_epoch::print_cost_values_epoch proc~print_cost_values_epoch->proc~print_epoch_line_start proc~report_cost_epoch mod_cost_calculator::CostCalculator%report_cost_epoch proc~report_cost_epoch->proc~print_cost_values_epoch proc~output_files_and_cost mod_output_files_and_cost::output_files_and_cost proc~output_files_and_cost->proc~report_cost_epoch proc~output_files_and_cost_4g_charges mod_output_files_and_cost_4g_charges::output_files_and_cost_4g_charges proc~output_files_and_cost_4g_charges->proc~report_cost_epoch proc~output_files_and_cost_4g_short_range mod_output_files_and_cost_4g_short_range::output_files_and_cost_4g_short_range proc~output_files_and_cost_4g_short_range->proc~report_cost_epoch proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~output_files_and_cost_4g_charges proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~output_files_and_cost proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~output_files_and_cost proc~train_loop_short_range->proc~output_files_and_cost_4g_short_range proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode

subroutine print_cost_values_epoch

subroutine print_cost_values_epoch( &
    cost_functions, &
    train_cost, &
    test_cost, &
    property_unit_conv, &
    epoch &
)

Prints the calculated training and test cost values for an epoch to standard output.

Arguments

  • cost_functions : type(LossFunctionPtr) (dim: (:)) [in]– Array of cost function objects, used for printing headers.
  • train_cost : real(DP) (dim: (:,:,:)) [in]– The calculated training costs (cost_function, committee, property).
  • test_cost : real(DP) (dim: (:,:,:)) [in]– The calculated test costs (cost_function, committee, property).
  • property_unit_conv : real(DP) (dim: (:)) [in]– Unit conversion factors to apply to each property's cost before printing.
  • epoch : integer [in]– The current epoch index.

Called By

proc~~print_cost_values_epoch~~CalledByGraph proc~print_cost_values_epoch mod_cost_epoch::print_cost_values_epoch proc~report_cost_epoch mod_cost_calculator::CostCalculator%report_cost_epoch proc~report_cost_epoch->proc~print_cost_values_epoch proc~output_files_and_cost mod_output_files_and_cost::output_files_and_cost proc~output_files_and_cost->proc~report_cost_epoch proc~output_files_and_cost_4g_charges mod_output_files_and_cost_4g_charges::output_files_and_cost_4g_charges proc~output_files_and_cost_4g_charges->proc~report_cost_epoch proc~output_files_and_cost_4g_short_range mod_output_files_and_cost_4g_short_range::output_files_and_cost_4g_short_range proc~output_files_and_cost_4g_short_range->proc~report_cost_epoch proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~output_files_and_cost_4g_charges proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~output_files_and_cost proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~output_files_and_cost proc~train_loop_short_range->proc~output_files_and_cost_4g_short_range proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode

subroutine print_num_updates_to_stdout

subroutine print_num_updates_to_stdout( &
    committee_size, &
    num_properties, &
    num_updates, &
    epoch &
)

Prints the number of weight updates for all committee members and properties to STDOUT.

The format is: UPDATES [epoch] [committee_index] [No. Updates Prop 1] [No. Updates Prop 2] ...

Arguments

  • committee_size : integer [in]– The number of committee members.
  • num_properties : integer [in]– The number of properties.
  • num_updates : integer (dim: (committee_size,num_properties)) [in]– The number of updates for each committee and property.
  • epoch : integer [in]– The current epoch index.

Called By

proc~~print_num_updates_to_stdout~~CalledByGraph proc~print_num_updates_to_stdout mod_cost_epoch::print_num_updates_to_stdout proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~print_num_updates_to_stdout proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~print_num_updates_to_stdout proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~print_num_updates_to_stdout proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode

subroutine print_epoch_timing_to_stdout

subroutine print_epoch_timing_to_stdout( &
    epoch &
)

Prints the walltime elapsed since the last call to this routine. This is intended to time the duration of one epoch.

The format is: TIMING [epoch] [wall_time] min

Arguments

  • epoch : integer [in]– The current epoch index.

Called By

proc~~print_epoch_timing_to_stdout~~CalledByGraph proc~print_epoch_timing_to_stdout mod_cost_epoch::print_epoch_timing_to_stdout proc~train_loop_4g_charges mod_train_loop_4g_charges::train_loop_4g_charges proc~train_loop_4g_charges->proc~print_epoch_timing_to_stdout proc~train_loop_atomic_property mod_train_loop_atomic_property::train_loop_atomic_property proc~train_loop_atomic_property->proc~print_epoch_timing_to_stdout proc~train_loop_short_range mod_train_loop_short_range::train_loop_short_range proc~train_loop_short_range->proc~print_epoch_timing_to_stdout proc~train_mode mod_train_mode::train_mode proc~train_mode->proc~train_loop_4g_charges proc~train_mode->proc~train_loop_atomic_property proc~train_mode->proc~train_loop_short_range program~runner RuNNer program~runner->proc~train_mode