From 3505916f6a350c4833443890c760c982d3059987 Mon Sep 17 00:00:00 2001 From: Angel Date: Wed, 21 Oct 2020 16:02:01 +0200 Subject: [PATCH 1/2] Added docker file --- .gitignore | 1 + Dockerfile | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 Dockerfile diff --git a/.gitignore b/.gitignore index bee8a64..8025bc0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ __pycache__ +*~ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..873626f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM ubuntu:20.04 + +RUN apt update +RUN apt install -y python3 python3-pip +RUN pip3 install numpy theano + +COPY . /usr/src/dockertest + +WORKDIR /usr/src/dockertest From 7d10b4820bcd8cca73bb11cd60a25f0bd838a8ae Mon Sep 17 00:00:00 2001 From: Angel Date: Wed, 21 Oct 2020 16:28:43 +0200 Subject: [PATCH 2/2] Added script for training network1 --- Dockerfile | 2 ++ test_network1.py | 9 +++++++++ 2 files changed, 11 insertions(+) create mode 100644 test_network1.py diff --git a/Dockerfile b/Dockerfile index 873626f..905c846 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,3 +7,5 @@ RUN pip3 install numpy theano COPY . /usr/src/dockertest WORKDIR /usr/src/dockertest + +CMD ["python3", "test_network1.py"] diff --git a/test_network1.py b/test_network1.py new file mode 100644 index 0000000..1e79346 --- /dev/null +++ b/test_network1.py @@ -0,0 +1,9 @@ +import mnist_loader +import network + +print("gathering data...") +training_data, validation_data, test_data = mnist_loader.load_data_wrapper() +print("data gathered.") +net = network.Network([784, 30, 10]) +print("starting to train network") +net.SGD(training_data, 30, 10, 3.0, test_data=test_data)