Grouped version of `conv1d_ncw_python`, see that for documentation
(a_np, w_np, stride, padding, dilation, groups)
| 46 | |
| 47 | |
| 48 | def group_conv1d_ncw_python(a_np, w_np, stride, padding, dilation, groups): |
| 49 | "Grouped version of `conv1d_ncw_python`, see that for documentation" |
| 50 | a_slices = np.array_split(a_np, groups, axis=1) |
| 51 | w_slices = np.array_split(w_np, groups, axis=0) |
| 52 | b_slices = [ |
| 53 | conv1d_ncw_python(a_slice, w_slice, stride, padding, dilation) |
| 54 | for a_slice, w_slice in zip(a_slices, w_slices) |
| 55 | ] |
| 56 | return np.concatenate(b_slices, axis=1) |
| 57 | |
| 58 | |
| 59 | def conv1d_ncw_python(a_np, w_np, stride, padding, dilation): |
nothing calls this directly
no test coverage detected
searching dependent graphs…