import tensorflow as tf

        self.set_training_op()
        
        # not used at the moment, could be useful at a certain point
        # self.create_random_update_op()

        # there are case in which multiple losses exit
        if isinstance(self.loss, dict):
            for k, v in self.loss.items():
                self.loss[k] = tf.check_numerics(v, "self.loss" + str(k) + " is not finite")
        else:
            self.loss = tf.check_numerics(self.loss, "self.loss is not finite")

        #session will be created after init
    
        
    def create_datasets_with_handles(self, dataset):
        datasets_nodes, handle, ds_initializers, ds_handles = dataset.get_dataset_with_handle(self.batch_size["train"], self.batch_size["eval"])
        self.datasets_initializers = ds_initializers
        self.datasets_handles_nodes = ds_handles
        self.ds_handle = handle
