Skip to content

Commit

Permalink
Divide input image color bands by their standard deviation after mean…
Browse files Browse the repository at this point in the history
… centering. Seems to have a small positive effect on training.
  • Loading branch information
Bleyddyn committed Dec 11, 2017
1 parent 803c723 commit 94cf17c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tf/drive_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ def loadData( dirs, image_norm=True ):
images[:,:,:,0] -= np.mean(images[:,:,:,0])
images[:,:,:,1] -= np.mean(images[:,:,:,1])
images[:,:,:,2] -= np.mean(images[:,:,:,2])
images[:,:,:,0] /= np.std(images[:,:,:,0])
images[:,:,:,1] /= np.std(images[:,:,:,1])
images[:,:,:,2] /= np.std(images[:,:,:,2])

y = embedActions( actions )
y = to_categorical( y, num_classes=5 )
Expand Down

0 comments on commit 94cf17c

Please sign in to comment.