Input data format (#25464)
* Add copied from statements for image processors * Move out rescale and normalize to base image processor * Remove rescale and normalize from vit (post rebase) * Update docstrings and tidy up * PR comments * Add input_data_format as preprocess argument * Resolve tests and tidy up * Remove num_channels argument * Update doc strings -> default ints not in code formatting
This commit is contained in:
@@ -337,6 +337,11 @@ class FlavaImageProcessingTest(ImageProcessingTestMixin, unittest.TestCase):
|
||||
def test_call_numpy(self):
|
||||
self._test_call_framework(np.ndarray, prepare_kwargs={"numpify": True})
|
||||
|
||||
def test_call_numpy_4_channels(self):
|
||||
self.image_processing_class.num_channels = 4
|
||||
self._test_call_framework(np.ndarray, prepare_kwargs={"numpify": True})
|
||||
self.image_processing_class.num_channels = 3
|
||||
|
||||
def test_call_pytorch(self):
|
||||
self._test_call_framework(torch.Tensor, prepare_kwargs={"torchify": True})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user