def with_optimizer_tensor(self, tensor: Union[tf.Tensor, tf.Operation]) -> 'Optimization':
        """
        Replace optimizer tensor.

            :param model: Tensorflow tensor.
            :return: Optimization instance self reference.
        """
        self._optimizer_tensor = tensor
        return self
Replace optimizer tensor.

            :param model: Tensorflow tensor.
            :return: Optimization instance self reference.