(variable, dist_opt, reducer)
| 256 | |
| 257 | # Function to all reduce NUMPY accuracy and loss from multiple devices |
| 258 | def reduce_variable(variable, dist_opt, reducer): |
| 259 | reducer.copy_from_numpy(variable) |
| 260 | dist_opt.all_reduce(reducer.data) |
| 261 | dist_opt.wait() |
| 262 | output = tensor.to_numpy(reducer) |
| 263 | return output |
| 264 | |
| 265 | |
| 266 | def resize_dataset(x, image_size): |
no test coverage detected