Skip to content

Commit c0a11ad

Browse files
committed
Internal fix.
PiperOrigin-RevId: 493182471
1 parent 1e68317 commit c0a11ad

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

official/vision/modeling/layers/edgetpu.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
# limitations under the License.
1414

1515
"""EdgeTPU oriented layers and tools."""
16-
from collections.abc import Iterable, Sequence
17-
from typing import List, Optional, Union
16+
from typing import Optional, Sequence, Union, Iterable
1817

1918
import numpy as np
2019
import tensorflow as tf
@@ -102,8 +101,8 @@ def _same(x):
102101

103102

104103
def shard_tensors(
105-
axis: int, block_size: int,
106-
tensors: Sequence[tf.Tensor]) -> Iterable[Sequence[tf.Tensor]]:
104+
axis: int, block_size: int, tensors: Sequence[tf.Tensor]
105+
) -> Union[list[Sequence[tf.Tensor]], Iterable[Sequence[tf.Tensor]]]:
107106
"""Consistently splits multiple tensors sharding-style.
108107
109108
Args:

0 commit comments

Comments
 (0)