Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
JuusoSaavalainen committed Mar 19, 2023
1 parent dc06f9f commit 8b54778
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/model/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from utility import NeuralNetwork
import matplotlib.pyplot as plt


class NNCLI:
def __init__(self):
self.data = dataformat.format()
Expand Down
17 changes: 13 additions & 4 deletions src/model/dataformat.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,21 @@ def randomize_rows(data):


def format():
# ::STILL IN DEVELOP MODE::
"""
Format is a function to
load and format the mnist data in
fixed way to be used in the training
Returns:
Train(48000), Test(10000), Validation(12000) data with X and Y
where Y is labels and X the pictures in fixed format
# load the data as so path to train data is defined here that is why its here.
# loading of the test data can be doned similarly
This could be turned in multiple functions and free the sizes
in this project there is no reason to do so
Validation data is not used in normal training so that could be separated
"""

# These
data = pd.read_csv(
'src/data/mnist_train.csv', header=None)

Expand Down
7 changes: 7 additions & 0 deletions src/model/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@


def save_image():
"""_summary_
save image is used for saving the picture from tkinter canvas
this function loads ands prepares the data in correct format to be
inputted for the nn and forwardpropped
cv2 is used for blurring effect on the images to mimic the original pictures
"""
x, y = (28, 28)
image = np.zeros((x, y), dtype=np.uint8)

Expand Down

0 comments on commit 8b54778

Please sign in to comment.