refactored
This commit is contained in:
+5
-7
@@ -1,15 +1,13 @@
|
||||
from .params import EntityParams
|
||||
from .state import RbmState
|
||||
from .status import Status
|
||||
from .train import train
|
||||
from .entity import Entity
|
||||
from .matrix import Mat, np
|
||||
from .train import TrainingParams
|
||||
from .entity import Entity, EntityParams
|
||||
|
||||
class Layer:
|
||||
def __init__(self, name: str, shape: tuple[int, int, int, int], params: EntityParams):
|
||||
def __init__(self, name: str, shape: tuple[int, int, int, int], entity_params: EntityParams, training_params: TrainingParams):
|
||||
self.name = name
|
||||
self.shape = shape
|
||||
self.entity = Entity((shape[0]*shape[1]+shape[2], shape[3]), params)
|
||||
self.entity = Entity((shape[0]*shape[1]+shape[2], shape[3]), entity_params)
|
||||
self.training_params = training_params
|
||||
|
||||
def init(self, std: float):
|
||||
self.entity.state.init(mu=0, std=std)
|
||||
|
||||
Reference in New Issue
Block a user