New Images

This commit is contained in:
Steffen Illium
2022-02-15 14:52:01 +01:00
parent 28b5e85697
commit 4f99251e68
11 changed files with 5 additions and 5 deletions

@ -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

Binary file not shown.

After

(image error) Size: 176 KiB

Binary file not shown.

After

(image error) Size: 94 KiB

Binary file not shown.

After

(image error) Size: 18 KiB

Binary file not shown.

After

(image error) Size: 18 KiB

Binary file not shown.

After

(image error) Size: 22 KiB

Binary file not shown.

After

(image error) Size: 24 KiB

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