nntrainer
nntrainer copied to clipboard
layer run-context should perform caller checks
layer run-context should perform caller checks before providing access to tensors. For example, accessing a tensor requested with FORWARD_FUNC_LIFESPAN in calcDerivative() must throw.
:octocat: cibot: Thank you for posting issue #1592. The person in charge will reply soon.
We can use __builtin_FUNCTION()
as a parameter to the getters to filter out the functions which can be provided access to the requested tensor.
Also, add checks for accessing the tensors based on the mode of execution - training / inference / etc.