6c1fe5c811f82c571af94f787b4721f3a1cc7ca4,src/sdk/pynni/nni/nas/pytorch/darts/mutator.py,DartsMutator,sample_final,#DartsMutator#,30
Before Change
result[mutable.key] = F.one_hot(index, num_classes=mutable.length).view(-1).bool()
for mutable in self.mutables:
if isinstance(mutable, InputChoice):
weights = torch.tensor([edges_max.get(src_key, 0.) for src_key in mutable.choose_from]) // pylint: disable=not-callable
_, topk_edge_indices = torch.topk(weights, mutable.n_chosen or mutable.n_candidates)
selected_multihot = []
for i, src_key in enumerate(mutable.choose_from):
After Change
for mutable in self.mutables:
if isinstance(mutable, InputChoice) and mutable.n_chosen is not None:
weights = []
for src_key in mutable.choose_from:
if src_key not in edges_max:
_logger.warning("InputChoice.NO_KEY in "%s" is weighted 0 when selecting inputs.", mutable.key)
weights.append(edges_max.get(src_key, 0.))
weights = torch.tensor(weights) // pylint: disable=not-callable
_, topk_edge_indices = torch.topk(weights, mutable.n_chosen)
selected_multihot = []
for i, src_key in enumerate(mutable.choose_from):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: microsoft/nni
Commit Name: 6c1fe5c811f82c571af94f787b4721f3a1cc7ca4
Time: 2019-11-25
Author: scottyugochang@gmail.com
File Name: src/sdk/pynni/nni/nas/pytorch/darts/mutator.py
Class Name: DartsMutator
Method Name: sample_final
Project Name: google/deepvariant
Commit Name: de37b10f2cbe01bee7baedbab37f485a6e7246aa
Time: 2017-12-04
Author: no-reply@google.com
File Name: deepvariant/docker/gcp_deepvariant_runner.py
Class Name:
Method Name: _run_call_variants
Project Name: google/deepvariant
Commit Name: de37b10f2cbe01bee7baedbab37f485a6e7246aa
Time: 2017-12-04
Author: no-reply@google.com
File Name: deepvariant/docker/gcp_deepvariant_runner.py
Class Name:
Method Name: _run_make_examples