INNER CODE UNIT · Python

cur_iters

pprp/SimpleCVReproduction · NAS/AngleNAS/DARTS/shrinking/main.py:102

        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()

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

    for i in range(start_iter, iters):
        print('search space size: {}'.format(get_search_space_size(operations)))
        # 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
            pickle.dump(operations, open(args.operations_path, 'wb'))
            break

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…