neuroailab / tfutils

Utilities for working with tensorflow
MIT License
25 stars 8 forks source link

Added option to restore local vars during validation #141

Closed anayebi closed 5 years ago

anayebi commented 5 years ago

This partially addresses issue #140 in that it fixes the issue I was having with tf metrics which keeps local variables for streaming confusion matrices, which were not being initialized during validation (test_from_params) mode. However, if there is a use case where the user wanted to restore the values of these local variables from the checkpoint (rather than from scratch, which is usually what you want -- e.g. you want to restore the confusion matrix to 0 whenever you re-evaluate a model), then this does not address that problem. However, it fixes the primary reason I made the issue in the first place.