Closed petered closed 4 years ago
Hi @petered
This feature has been requested before and is "on my radar". Check out my 2nd comment in #12 which explains how I envision this ability. If you have anything to add or comment to that, please continue the discussion there.
I find it would be really nice to assign names to dimensions, e.g.
NDArray[('H', 'W', 3), UInt8]
... and a more compact option:NDArray['H,W,3', UInt8]
. This can serve two purposes:image: NDArray['H,W,3', UInt8]
is clearly a (height x width) image with 3 color channelsinput_data = NDArray['N,D', Float]
is (using common conventions) an array of N D-dimensional data points.def compute_losses(self, images: NDArray['N,H,W,3', UInt8], labels: NDArray['N', Int]) -> NDArray['N', Float]
Would indicate that we expect thatimages.shape[0]==labels.shape[0]==return_value.shape[0]