Skip to content

Commit 8bb4b25

Browse files
authored
fixed-vectorized-map-example (#21503)
1 parent 51497a1 commit 8bb4b25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

keras/src/ops/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1087,18 +1087,18 @@ def vectorized_map(function, elements):
10871087
in the case of a single tensor input `elements`:
10881088
10891089
```python
1090-
def vectorized_map(function, elements)
1090+
def vectorized_map(function, elements):
10911091
outputs = []
10921092
for e in elements:
10931093
outputs.append(function(e))
1094-
return stack(outputs)
1094+
return np.stack(outputs)
10951095
```
10961096
10971097
In the case of an iterable of tensors `elements`,
10981098
it implements the following:
10991099
11001100
```python
1101-
def vectorized_map(function, elements)
1101+
def vectorized_map(function, elements):
11021102
batch_size = elements[0].shape[0]
11031103
outputs = []
11041104
for index in range(batch_size):

0 commit comments

Comments
 (0)