INNER CODE UNIT · Python

cur_iters

pprp/SimpleCVReproduction · NAS/AngleNAS/SPOS/shrinking/main.py:126

        cur_iters = (config.first_stage_epochs + (start_iter-1) *
                     config.other_stage_epochs)*per_epoch_iters if start_iter > 0 else 0
        for _ in range(cur_iters):
            if scheduler.get_lr()[0] > args.min_lr:
                scheduler.step()
        print('resume from iters={}'.format(cur_iters))

    # Save the base weights for computing angle
    if start_iter == 0 and args.local_rank == 0:
        torch.save(model.module.state_dict(), config.initial_net_cache)
        print('save base weights ...')

    for i in range(start_iter, iters):
        print('search space size: {}'.format(
            get_search_space_size(operations))) # 6 ^ 21
        # ABS finishes when the size of search space is less than the threshold
        if get_search_space_size(operations) <= config.shrinking_finish_threshold: # 将模型搜索大小限制在一个范围
            # save the shrunk search space

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…