Sorry to bother you! I meet the following problem when writing my error function:
“RuntimeError: vmap: inplace arithmetic(self, *extra_args) is not possible because there exists a Tensor other in extra_args that has more elements than self. This happened due to other being vmapped over but self not being vmapped over in a vmap. Please try to use out-of-place operators instead of inplace arithmetic. If said operator is being called inside the PyTorch framework, please file a bug report instead."
❓ Questions and Help
Sorry to bother you! I meet the following problem when writing my error function:
“RuntimeError: vmap: inplace arithmetic(self, *extra_args) is not possible because there exists a Tensor
other
in extra_args that has more elements thanself
. This happened due toother
being vmapped over butself
not being vmapped over in a vmap. Please try to use out-of-place operators instead of inplace arithmetic. If said operator is being called inside the PyTorch framework, please file a bug report instead."The code is in the following:
def quad_error_fn(optim_vars, aux_vars): [maps_opt] = optim_vars [maps_ij_va] = aux_vars