Unverified Commit 641fdd9f authored by Philip Meier's avatar Philip Meier Committed by GitHub
Browse files

remove custom types defintions from datapoints module (#7814)

parent 6b020798
import functools
import warnings
from typing import Any, Callable, Dict, Type
from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union
import torch
from torchvision import datapoints
_FillType = Union[int, float, Sequence[int], Sequence[float], None]
_FillTypeJIT = Optional[List[float]]
def is_simple_tensor(inpt: Any) -> bool:
return isinstance(inpt, torch.Tensor) and not isinstance(inpt, datapoints.Datapoint)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment