update codes

This commit is contained in:
D-X-Y
2020-01-12 01:42:17 +11:00
parent 654015bf9d
commit 33384a78af
15 changed files with 288 additions and 21 deletions

View File

@@ -5,7 +5,7 @@ import torch
import torch.nn as nn
from copy import deepcopy
from ..cell_operations import ResNetBasicblock
from .search_cells import SearchCell
from .search_cells import NAS102SearchCell as SearchCell
from .genotypes import Structure
@@ -59,6 +59,10 @@ class TinyNetworkGDAS(nn.Module):
def get_alphas(self):
return [self.arch_parameters]
def show_alphas(self):
with torch.no_grad():
return 'arch-parameters :\n{:}'.format( nn.functional.softmax(self.arch_parameters, dim=-1).cpu() )
def get_message(self):
string = self.extra_repr()
for i, cell in enumerate(self.cells):