anchor.diff:           '     ll_ene,   data_ene,'//&
            '  prior_ene,   cpu_time,       pacc'
   
  -!    if (niter_agd > 0) call map_agd('nag',nvars,nclasses,seq,seqs_table,prm,fmodel,&
  -!         fdata,data_format,ulog,beta,lambda,&
  -!         niter_agd,mc_nsweeps,tot_iter,nupdate)
  -!    
  -!    if (niter_gd > 0) call map_gd(nvars,nclasses,seq,seqs_table,prm,fmodel,&
  -!         fdata,data_format,ulog,beta,lambda,&
  -!         niter_gd,mc_nsweeps,tot_iter,nupdate)
  -
  -    if (niter_agd > 0) call map_all('adam',nvars,nclasses,seq,seqs_table,prm,fmodel,&
  +    if (niter_agd > 0) call map_all('nag',nvars,nclasses,seq,seqs_table,prm,fmodel,&
            fdata,data_format,ulog,beta,lambda,&
            niter_agd,mc_nsweeps,tot_iter,nupdate)
       
  
positive.code:        end if
         tfista = 1.0_kflt
      case('adam')
         eps_map = 0.001_kflt
         if (iproc == 0) then 
            allocate(prm1(dimm),stat=err)
            allocate(prm2(dimm),stat=err)
  
negative.code:     end if
  
    end subroutine map_learn
  
    subroutine map_all(algorithm,nvars,nclasses,seq,seqs_table,prm,fmodel,fdata,data_format,ulog,beta,lambda,niter,&
         mc_nsweeps,tot_iter,nupdate)
  