MrGemy95/Tensorflow-Project-Template

About the `init_saver` of base_model?

imhuay opened this issue · 1 comments

Why don't direct use the implement in the annotation?

    def init_saver(self):
        # just copy the following line in your child class
        # self.saver = tf.train.Saver(max_to_keep=self.config.max_to_keep)
        raise NotImplementedError

as "tf.train.Saver" takes the current tensorflow variables and save them, so calling this before building the model will save nothing and will lead to a serious bug, so i preferred to force this function to be implemented in the child class.