New Images

This commit is contained in:
Steffen Illium
2022-02-17 13:13:41 +01:00
parent 4f99251e68
commit 5aea4f9f55
10 changed files with 109 additions and 50 deletions

View File

@ -15,6 +15,18 @@ from tqdm import tqdm
def prng():
return random.random()
class FixTypes:
divergent = 'divergent'
fix_zero = 'fix_zero'
identity_func = 'identity_func'
fix_sec = 'fix_sec'
other_func = 'other_func'
@classmethod
def all_types(cls):
return [val for key, val in cls.__dict__.items() if isinstance(val, str) and not key.startswith('_')]
class Net(nn.Module):
@ -79,7 +91,7 @@ class Net(nn.Module):
self.trained = False
self.number_trained = 0
self.is_fixpoint = ""
self.is_fixpoint = FixTypes.other_func
self.layers = nn.ModuleList(
[nn.Linear(i_size, h_size, False),
nn.Linear(h_size, h_size, False),