Mateusz Burniak, 218321
Zastosowanie sztucznych sieci neuronowych
do diagnostyki stanów ostrego brzucha
Application of artificial neural networks
to the diagnosis of surgical abdomen states
class Layer:
def __init__(self, shape, activation='sigmoid'):
...
def feedforward(self, x: np.ndarray) -> np.ndarray:
...
def calc_delta(self, d: np.ndarray = None):
...
def calc_gradient(self):
...
def update_weights(self):
...
def input_data(shape: Tuple[Optional[int], int]) -> Layer:
...
def fully_connected(incoming: Layer, n_units: int,
activation='relu') -> Layer:
...
net = input_data(shape=(None, x_train.shape[1]))
net = fully_connected(net, 24, activation='sigmoid')
net = fully_connected(net, 16, activation='sigmoid')
net = fully_connected(net, 12, activation='sigmoid')
net = fully_connected(net, 8, activation='sigmoid')
class Model:
def __init__(self, network: Layer):
...
def fit(self, X_inputs: np.ndarray, Y_targets: np.ndarray,
validation_set: Tuple[np.ndarray, np.ndarray] = None,
learning_rate=None, n_epoch=10, batch_size=64,
shuffle=False, train_file='train.json'):
...
def predict(self, x: np.ndarray) -> np.ndarray:
...
def load(self, model_file: str):
...
def save(self, model_file: str):
...
model_file = 'model.json'
model = Model(net)
model.fit(x_train, y_train,
validation_set=(x_test, y_test),
n_epoch=30,
batch_size=10)
model.save(model_file)
model.load(model_file)
Tydzień | Zadania |
---|---|
dotychczas (do 5 XI) | skończona aplikacja ze stałym LR |
VI (6 XI - 12 XI) | zmiana LR w miarę uczenia, początek dokumentacji |
VII (13 XI - 19 XI) | opis API |
VIII (20 XI - 26 XI) | wstęp + zakończenie |
IX (27 XI - 3 XII) | prace redakcyjne |
X (4 XII - 10 XII) | ??? |
Mateusz Burniak, 218321