Utilities

flood_forecast.utils.numpy_to_tvar(x)[source]

Converts a numpy array into a PyTorch Tensor

Parameters

x (torch.Tensor) – A numpy array you want to convert

Returns

A tensor variable

Return type

torch.Variable

flood_forecast.utils.flatten_list_function(input_list: List)[source]
flood_forecast.utils.make_criterion_functions(crit_list: List) List[source]

crit_list should be either dict or list