Skip to content

Commit 021657e

Browse files
Updated readme + 2nd example from 3rd chapter
1 parent 988965a commit 021657e

File tree

2 files changed

+23
-15
lines changed

2 files changed

+23
-15
lines changed

README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# Overview
22

3-
### neuralnetworksanddeeplearning.com integrated scripts for Python 3.4.3 and Theano with CUDA support
3+
### neuralnetworksanddeeplearning.com integrated scripts for Python 3.5.2 and Theano with CUDA support
44

5-
These scrips are updated ones from the **neuralnetworksanddeeplearning.com** gitHub repository in order to fully work with Python 3.4.3.
5+
These scrips are updated ones from the **neuralnetworksanddeeplearning.com** gitHub repository in order to fully work with latest Pyethon distribution.
66

7-
The testing file (**test.py**) contains all three networks (network.py, network2.py, network3.py) and is the starting point to run (i.e. *train and evaluate*) them.
7+
The testing file (**test.py**) contains all three networks (network.py, network2.py, network3.py) from the book and it is the starting point to run (i.e. *train and evaluate*) them.
88

99
# Usage
1010

1111
Just type at shell:
12-
**python3 test.py**
13-
14-
# Aim
15-
16-
I just want to make other's life easier. Feel free to modify it.
12+
**python3.5 test.py**
1713

1814

test.py

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,33 @@
2020

2121
import mnist_loader
2222
training_data, validation_data, test_data = mnist_loader.load_data_wrapper()
23+
training_data = list(training_data)
2324

2425
# ---------------------
2526
# - network.py example:
2627

27-
# import network
28-
# net = network.Network([784, 30, 10])
29-
# net.SGD(training_data, 30, 10, 3.0, test_data=test_data)
28+
import network
29+
net = network.Network([784, 30, 10])
30+
net.SGD(training_data, 30, 10, 3.0, test_data=test_data)
3031

3132
# ----------------------
3233
# - network2.py example:
3334

34-
import network2
35-
net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost)
36-
#net.large_weight_initializer()
37-
net.SGD(training_data, 30, 10, 0.1, lmbda = 5.0,evaluation_data=validation_data, monitor_evaluation_accuracy=True)
35+
# import network2
36+
# net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost)
37+
# #net.large_weight_initializer()
38+
# net.SGD(training_data, 30, 10, 0.1, lmbda = 5.0,evaluation_data=validation_data,
39+
# monitor_evaluation_accuracy=True)
40+
41+
42+
# chapter 3 - Overfitting and regularization example
43+
# import network2
44+
# net = network2.Network([784, 30, 10], cost=network2.CrossEntropyCost)
45+
# net.large_weight_initializer()
46+
# net.SGD(training_data[:1000], 400, 10, 0.5, evaluation_data=test_data,
47+
# monitor_evaluation_accuracy=True,
48+
# monitor_training_cost=True)
49+
3850

3951
# ----------------------
4052
# - network3.py example:

0 commit comments

Comments
 (0)