Inplace variable fix
Created by: jmitrevs
This pull request fixes the reference of an InplaceVariable
when optimizers remove the reference. It was reported in Issue #263 (closed).
The solution adds an update_inplace_variables
member function to Layers, with the default implementation being just pass
. If a layer does have an InplaceVariable
, however, it must update the reference. Such a function is implemented for the Reshape
layer.
The added pytest fails in the current main branch, but succeeds with this fix.