(variable, dist_opt, reducer)
| 75 | |
| 76 | # Function to all reduce NUMPY accuracy and loss from multiple devices |
| 77 | def reduce_variable(variable, dist_opt, reducer): |
| 78 | reducer.copy_from_numpy(variable) |
| 79 | dist_opt.all_reduce(reducer.data) |
| 80 | dist_opt.wait() |
| 81 | output = tensor.to_numpy(reducer) |
| 82 | return output |
| 83 | |
| 84 | |
| 85 | def resize_dataset(x, image_size): |
no test coverage detected