Returns the numpy version of tensors
(self, *arrays)
| 259 | |
| 260 | # convert batch of tensors to numpy |
| 261 | def to_numpy(self, *arrays): |
| 262 | """Returns the numpy version of tensors""" |
| 263 | if len(arrays) == 1: |
| 264 | return self._to_numpy(arrays[0]) |
| 265 | else: |
| 266 | return [self._to_numpy(array) for array in arrays] |
| 267 | |
| 268 | # convert a tensor to numpy |
| 269 | def _to_numpy(self, a): |