hookeai.simulators.fetorch.material.models.vmap.von_mises.convert_dict_to_tensor

convert_dict_to_tensor(data_dict, is_inplace=True)[source]

Convert all int, float and bool in dictionary to torch.Tensor.

Torch default types are assumed for each variable input type.

Torch tensors and non-listed types are kept unchanged.

Nested dictionaries are processed recursively.

Parameters:
  • data_dict (dict) – Dictionary.

  • is_inplace (bool, default=True) – If True, then input dictionary is updated in-place.

Returns:

data_dict – Dictionary.

Return type:

dict