def dw_fun(out, bf, vg, grad, idx, fmode): cc = nm.ascontiguousarray bft = cc(nm.tile(bf, (out.shape[0], 1, 1, 1))) if fmode == 0: status = terms.mulATB_integrate(out, bft, cc(grad[..., idx:idx+1, :]), vg) else: status = terms.mulATB_integrate(out, bft, cc(vg.bfg[:,:,idx:(idx + 1),:]), vg) return status
def dw_fun(out, val, mat, bf, vg, fmode): if fmode == 0: status = terms.mulATB_integrate(out, vg.bfg, mat * val, vg) elif fmode == 1: status = terms.mulATB_integrate(out, bf * mat, val, vg) elif fmode == 2: status = terms.mulATB_integrate(out, vg.bfg, mat * bf, vg) elif fmode == 3: status = terms.mulATB_integrate(out, mat * bf, vg.bfg, vg) return status
def dw_fun(out, bf, vg, idx): cc = nm.ascontiguousarray bft = cc(nm.tile(bf, (out.shape[0], 1, 1, 1))) status = terms.mulATB_integrate(out, bft, cc(vg.bfg[:,:,idx:(idx + 1),:]), vg) return status