Skip to content

Commit

Permalink
increase to 40 epochs
Browse files Browse the repository at this point in the history
  • Loading branch information
miendinh committed Nov 18, 2017
1 parent 6353bab commit cd9221c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 18 deletions.
22 changes: 6 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,15 @@ PIL
![](data/cost.png)
```
Training...
Epoch: 01 cost = 6.772273257
Epoch: 02 cost = 4.885908848
Epoch: 03 cost = 4.292183308
Epoch: 04 cost = 3.791747945
Epoch: 05 cost = 3.244293085
Epoch: 06 cost = 2.757302330
Epoch: 07 cost = 2.223773586
Epoch: 08 cost = 1.844299474
Epoch: 09 cost = 1.571607014
Epoch: 10 cost = 1.377784024
Epoch: 11 cost = 1.216272550
Epoch: 12 cost = 1.091827986
Epoch: 13 cost = 0.973539455
Epoch: 14 cost = 0.879507029
Epoch: 15 cost = 0.813665386
......
Epoch: 38 cost = 0.312853018
Epoch: 39 cost = 0.298816641
Epoch: 40 cost = 0.293328794
Evaluation
------------------------------
Test Accuracy: 0.927347593306
Test Accuracy: 0.974867469544
```


Expand Down
Binary file modified data/cost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion model.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def train(self, learning_rate, training_epochs, batch_size, keep_prob):
avg_cost += c / total_batch

if self.log:
self.train_writer.add_summary(summary, epoch)
self.train_writer.add_summary(summary, epoch + 1)

print('Epoch:', '%02d' % (epoch + 1), 'cost =', '{:.9f}'.format(avg_cost))

Expand Down
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@

vocr = VietOcr(weights=None, sess=sess)

vocr.train(learning_rate=0.001, training_epochs=15, batch_size=1000, keep_prob=0.7)
vocr.train(learning_rate=0.001, training_epochs=40, batch_size=1000, keep_prob=0.7)

vocr.evaluate(batch_size=1000, keep_prob=1)

0 comments on commit cd9221c

Please sign in to comment.