diff --git a/aloscene/tensors/augmented_tensor.py b/aloscene/tensors/augmented_tensor.py index caac1111..a1661f8c 100644 --- a/aloscene/tensors/augmented_tensor.py +++ b/aloscene/tensors/augmented_tensor.py @@ -1,5 +1,6 @@ import torch import inspect +import warnings import numpy as np from typing import * import copy @@ -11,6 +12,10 @@ class AugmentedTensor(torch.Tensor): # Common dim names that must be aligned to handle label on a Tensor. COMMON_DIM_NAMES = ["B", "T"] + # Ignore named tansors userwarning. + ERROR_MSG = "Named tensors and all their associated APIs are an experimental feature and subject to change" + warnings.filterwarnings(action='ignore', message=ERROR_MSG) + @staticmethod def __new__(cls, x, names=None, device=None, *args, **kwargs): # TODO The following is not optigal yet