(variable, dist_opt, reducer)
| 249 | |
| 250 | # Function to all reduce NUMPY accuracy and loss from multiple devices |
| 251 | def reduce_variable(variable, dist_opt, reducer): |
| 252 | reducer.copy_from_numpy(variable) |
| 253 | dist_opt.all_reduce(reducer.data) |
| 254 | dist_opt.wait() |
| 255 | output = tensor.to_numpy(reducer) |
| 256 | return output |
| 257 | |
| 258 | |
| 259 | def resize_dataset(x, image_size): |
no test coverage detected