Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there no code about guilded mutation in esr-ea or I missed it ? #30

Closed
32l opened this issue Jul 23, 2020 · 2 comments
Closed

Is there no code about guilded mutation in esr-ea or I missed it ? #30

32l opened this issue Jul 23, 2020 · 2 comments
Assignees

Comments

@32l
Copy link

32l commented Jul 23, 2020

Hi, thanks for your awesome work, but i doubt whether the implement of EA's mutation is correct, the paper says that we should acquire the block credits during model evaluation procedure, which can be used to guide the mutation to accelerate searching and find better architecture, I find that vega's implementation is general mutaion, could you help me? thanks!

@zhangjiajin zhangjiajin self-assigned this Jul 29, 2020
@zhangjiajin
Copy link
Member

Please check file: vega/algorithms/nas/esr_ea/esr_ea_individual.py

    def mutation_node(self, mutation_rate=0.05):
        """Mutate the active node type of individual.
        :param mutation_rate: the prosibility to mutate, defaults to 0.05
        :type mutation_rate: float
        """
        for node_ind in range(self.node_num):
            if self.gene[node_ind][0] and np.random.rand() < mutation_rate:
                type_prob = self.net_info.func_prob
                self.gene[node_ind][1] = bisect_right(type_prob, random())
        self.active_net = self.active_net_list()
        self.parameter = self.network_parameter()
        self.flops = self.network_flops()

It's guided mutation, not normal mutation.
The func_prob is guide information.

@32l
Copy link
Author

32l commented Aug 5, 2020

ok, thanks. I will double check the code.

@32l 32l closed this as completed Aug 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants