- fixed armadillo data read

- added shape to layer
- changed construction of layer from Stack factory
- fixed rms_error_accu scaling
- RBM: added image display using opencv
- improved Status print
This commit is contained in:
2025-12-17 17:05:40 +01:00
parent a1e7a803d1
commit 6ef577c769
6 changed files with 29 additions and 32 deletions
+3 -2
View File
@@ -7,9 +7,10 @@ from status import Status
from cd_train import cd_jens
class Layer:
def __init__(self, name: str, dim: tuple[int, int], params: RbmParams):
def __init__(self, name: str, shape: tuple[int, int, int, int], params: RbmParams):
self.name = name
self.state = RbmState.from_layer_params(dim)
self.shape = shape
self.state = RbmState.from_layer_params((shape[0]*shape[1]+shape[2], shape[3]))
self.params = params
self.state_filename = f"{self.name}_state.npz"