Bayesian Optimized Continual Learning with Attention Mechanism