We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e68317 commit c0a11adCopy full SHA for c0a11ad
official/vision/modeling/layers/edgetpu.py
@@ -13,8 +13,7 @@
13
# limitations under the License.
14
15
"""EdgeTPU oriented layers and tools."""
16
-from collections.abc import Iterable, Sequence
17
-from typing import List, Optional, Union
+from typing import Optional, Sequence, Union, Iterable
18
19
import numpy as np
20
import tensorflow as tf
@@ -102,8 +101,8 @@ def _same(x):
102
101
103
104
def shard_tensors(
105
- axis: int, block_size: int,
106
- tensors: Sequence[tf.Tensor]) -> Iterable[Sequence[tf.Tensor]]:
+ axis: int, block_size: int, tensors: Sequence[tf.Tensor]
+) -> Union[list[Sequence[tf.Tensor]], Iterable[Sequence[tf.Tensor]]]:
107
"""Consistently splits multiple tensors sharding-style.
108
109
Args:
0 commit comments