import tensorflow as tf

                logger.info(f'load trainset-{i} {len(traindata)}')

            for i in range(20):
                if not os.path.exists(f'./{inittask}/{taskname}.devset.task0.slbo{i}.pkl'): continue
                devdata = pickle.load(open(f'./{inittask}/{taskname}.devset.task0.slbo{i}.pkl', 'rb'))
                add_multi_step(devdata, task_dev_sets[0])
                logger.info(f'load devset-{i} {len(devdata)}')

            logger.info('Load the first task saver!')
            saver.load_state_dict(np.load(f'./{inittask}/{taskname}.task0.saver.npy', allow_pickle=True)[()])

            logger.info('Update all copies! (lazymodel, normalizers_copy)')
            tf.get_default_session().run(sync_model_to_lazymodel)
            tf.get_default_session().run(copy_normalizers)
            logger.info('Loaded normalizers:')
            load_norm = tf.get_default_session().run(normalizers_parameters)
            logger.info(load_norm)
            TASK_NUM = 1
            ########################## debug #########################
            #for task_idx in range(TASK_NUM):
            #    total_loss = []
            #    for scan in range(100):
            #        samples = task_train_sets[task_idx].sample_multi_step(FLAGS.model.dev_batch_size, 1, FLAGS.model.multi_step)
            #        loss_i = loss_mod.get_loss(samples.state, samples.next_state, samples.action, ~samples.done & ~samples.timeout)
            #        total_loss.append(loss_i.mean())
            #    total_loss = np.mean(total_loss)
            #    print ('loaded model train loss:', total_loss)

            #for task_idx in range(TASK_NUM):
            #    total_loss = []
