Is your feature request related to a problem? Please describe
To clearly define the expected inputs/outputs for a given nn.Module, it would be convenient to create a wrapper class for torch.Tensor that encapsulates shape schema and allows for comparisons
Describe the solution you'd like
Create a class called torcharch.types.TensorShape which is initialized with the tensor dimensionality as well any restrictions on the valid range of values each dimension can take on. This can be useful for several cases
- Custom modules should define a valid input/output
@property
- End users can use this interface to check their work
- Schema can also be used to conduct dynamic unit tests
Describe alternatives you've considered
- The main alternative would be using the built-in tensor class to define a dummy example. However, this is limiting in that the object can't contain schema information about the acceptable range of values in each dimension
- It does not appear that PyTorch includes a class like this currently, although that would be preferable
Is your feature request related to a problem? Please describe
To clearly define the expected inputs/outputs for a given
nn.Module, it would be convenient to create a wrapper class fortorch.Tensorthat encapsulates shape schema and allows for comparisonsDescribe the solution you'd like
Create a class called
torcharch.types.TensorShapewhich is initialized with the tensor dimensionality as well any restrictions on the valid range of values each dimension can take on. This can be useful for several cases@propertyDescribe alternatives you've considered