Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Fix visualization for ENAS micro #2813

Merged
merged 1 commit into from
Aug 24, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/sdk/pynni/nni/nas/pytorch/mutator.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def on_forward_layer_choice(self, mutable, *args, **kwargs):
if self._connect_all:
return self._all_connect_tensor_reduction(mutable.reduction,
[op(*args, **kwargs) for op in mutable]), \
torch.ones(len(mutable))
torch.ones(len(mutable)).bool()

def _map_fn(op, args, kwargs):
return op(*args, **kwargs)
Expand Down Expand Up @@ -192,7 +192,7 @@ def on_forward_input_choice(self, mutable, tensor_list):
"""
if self._connect_all:
return self._all_connect_tensor_reduction(mutable.reduction, tensor_list), \
torch.ones(mutable.n_candidates)
torch.ones(mutable.n_candidates).bool()
mask = self._get_decision(mutable)
assert len(mask) == mutable.n_candidates, \
"Invalid mask, expected {} to be of length {}.".format(mask, mutable.n_candidates)
Expand Down