Function fann_sys::fann_get_num_layers[][src]

pub unsafe extern "C" fn fann_get_num_layers(ann: *const fann) -> c_uint

Get the number of layers in the network.

Parameters

  • ann - A previously created neural network structure of type fann pointer.

Returns

The number of layers in the neural network

Example

// Obtain the number of layers in a neural network
unsafe {
    let ann = fann_sys::fann_create_standard(4, 2, 8, 9, 1);
    assert_eq!(4, fann_sys::fann_get_num_layers(ann));
}

This function appears in FANN >= 2.1.0