Created by: sneaxiy
Refactor tracer by adding VariableWrapper
to avoid circular reference of std::shared_ptr
. BTW, remove the ownership of VarBase
and OpBase
apart from Engine
, so that all operators can be destructed automatically when all variables are destructed. Users do not need to set layer.eval()
when doing inference to avoid memory leak.