New Images
This commit is contained in:
@ -203,7 +203,7 @@ if __name__ == '__main__':
|
||||
batch_train_beta = 1
|
||||
weight_hidden_size = 5
|
||||
residual_skip = True
|
||||
dropout = 0.1
|
||||
dropout = 0
|
||||
|
||||
data_path = Path('data')
|
||||
data_path.mkdir(exist_ok=True, parents=True)
|
||||
|
Binary file not shown.
After ![]() (image error) Size: 187 KiB |
Binary file not shown.
After ![]() (image error) Size: 93 KiB |
BIN
figures/res_no_res/mn_st_200_8_alpha_100_training_lineplot.png
Normal file
BIN
figures/res_no_res/mn_st_200_8_alpha_100_training_lineplot.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 176 KiB |
Binary file not shown.
After ![]() (image error) Size: 94 KiB |
BIN
figures/sanity/sanity_10hidden_xtimesn.png
Normal file
BIN
figures/sanity/sanity_10hidden_xtimesn.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 18 KiB |
BIN
figures/sanity/sanity_2hidden_xtimesn.png
Normal file
BIN
figures/sanity/sanity_2hidden_xtimesn.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 18 KiB |
BIN
figures/sanity/sanity_3hidden_xtimesn.png
Normal file
BIN
figures/sanity/sanity_3hidden_xtimesn.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 22 KiB |
BIN
figures/sanity/sanity_4hidden_xtimesn.png
Normal file
BIN
figures/sanity/sanity_4hidden_xtimesn.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 24 KiB |
BIN
figures/sanity/sanity_6hidden_xtimesn.png
Normal file
BIN
figures/sanity/sanity_6hidden_xtimesn.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 23 KiB |
@ -423,18 +423,18 @@ class MetaNet(nn.Module):
|
||||
return self
|
||||
|
||||
def forward(self, x):
|
||||
if self.dropout_layer:
|
||||
if self.dropout != 0:
|
||||
x = self.dropout_layer(x)
|
||||
tensor = self._meta_layer_first(x)
|
||||
for idx, meta_layer in enumerate(self._meta_layer_list, start=1):
|
||||
if self.dropout:
|
||||
if self.dropout != 0:
|
||||
tensor = self.dropout_layer(tensor)
|
||||
if idx % 2 == 1:
|
||||
x = tensor.clone()
|
||||
tensor = meta_layer(tensor)
|
||||
if idx % 2 == 0:
|
||||
tensor = tensor + x
|
||||
if self.dropout_layer:
|
||||
if self.dropout != 0:
|
||||
x = self.dropout_layer(x)
|
||||
tensor = self._meta_layer_last(x)
|
||||
return tensor
|
||||
@ -482,7 +482,7 @@ class MetaNetCompareBaseline(nn.Module):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
metanet = MetaNet(interface=3, depth=5, width=3, out=1, dropout=0.1, residual_skip=True)
|
||||
metanet = MetaNet(interface=3, depth=5, width=3, out=1, dropout=0.0, residual_skip=True)
|
||||
next(metanet.particles).input_weight_matrix()
|
||||
metanet(torch.hstack([torch.full((2, 1), 1.0) for _ in range(metanet.interface)]))
|
||||
a = metanet.particles
|
||||
|
Reference in New Issue
Block a user