(variable, dist_opt, reducer)
| 82 | |
| 83 | # Function to all reduce NUMPY Accuracy and Loss from Multiple Devices |
| 84 | def reduce_variable(variable, dist_opt, reducer): |
| 85 | reducer.copy_from_numpy(variable) |
| 86 | dist_opt.all_reduce(reducer.data) |
| 87 | dist_opt.wait() |
| 88 | output = tensor.to_numpy(reducer) |
| 89 | return output |
| 90 | |
| 91 | |
| 92 | def resize_dataset(x, image_size): |
no test coverage detected