Add test case for complex number support for tf.extract_image_patches
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
parent
6ab77f3be3
commit
f3c49c5e45
@ -125,5 +125,20 @@ class ExtractImagePatches(test.TestCase):
|
||||
padding="VALID",
|
||||
patches=patches)
|
||||
|
||||
def testComplexDataTypes(self):
|
||||
"""Test for complex data types"""
|
||||
for dtype in [np.complex64, np.complex128]:
|
||||
image = np.reshape(range(120), [2, 3, 4, 5]).astype(dtype)
|
||||
patches = np.reshape(range(120), [2, 3, 4, 5]).astype(dtype)
|
||||
for padding in ["VALID", "SAME"]:
|
||||
self._VerifyValues(
|
||||
image,
|
||||
ksizes=[1, 1],
|
||||
strides=[1, 1],
|
||||
rates=[1, 1],
|
||||
padding=padding,
|
||||
patches=patches)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
test.main()
|
||||
|
Loading…
Reference in New Issue
Block a user