nntrainer icon indicating copy to clipboard operation
nntrainer copied to clipboard

layer run-context should perform caller checks

Open kparichay opened this issue 2 years ago • 3 comments

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.

kparichay avatar Sep 28 '21 03:09 kparichay

:octocat: cibot: Thank you for posting issue #1592. The person in charge will reply soon.

taos-ci avatar Sep 28 '21 03:09 taos-ci

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.

kparichay avatar Sep 28 '21 03:09 kparichay

Also, add checks for accessing the tensors based on the mode of execution - training / inference / etc.

kparichay avatar Sep 28 '21 03:09 kparichay