Source code for experimental_experiment.xbuilder.virtual_tensor
fromtypingimportAny,Tuple,Union
[docs]classVirtualTensor:""" Defines a the type and shape for a tensor without its content. """def__init__(self,name:str,dtype:Any,shape:Tuple[Union[int,str],...]):self.name=nameself.dtype=dtypeself.shape=shapedef__repr__(self)->str:return(f"{self.__class__.__name__}({self.name!r}, dtype={self.dtype}, shape={self.shape})")