Entity: refactored taining algo into train module
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from status import Status
|
||||
from cd_train import cd_jens
|
||||
from train import train
|
||||
from stack import Stack, StackType
|
||||
from matrix import Mat, np
|
||||
|
||||
@@ -21,7 +21,7 @@ class StackDeep(Stack):
|
||||
for index, layer in enumerate(self.layers):
|
||||
print(f"Train layer {index} for {layer.entity.params.num_epochs} epochs")
|
||||
_batch = self.batch_from(batch, index)
|
||||
layer.entity.train(_batch, cd_func=cd_jens, status=status)
|
||||
train(layer.entity, _batch, status=status)
|
||||
|
||||
|
||||
def pass_up(self, visible: Mat, from_layer_id: int = 0):
|
||||
|
||||
Reference in New Issue
Block a user