Skip to content

Commit e1aeb24

Browse files
committed
typoo
1 parent c5b03e4 commit e1aeb24

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

mitdeeplearning/lab3.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,18 @@
44

55

66
def play_video(filename):
7-
encoded = base64.b64encode(io.open('./agent.mp4', 'r+b').read())
7+
encoded = base64.b64encode(io.open(filename, 'r+b').read())
88
embedded = HTML(data='''
99
<video controls>
1010
<source src="data:video/mp4;base64,{0}" type="video/mp4" />
1111
</video>'''.format(encoded.decode('ascii')))
1212

1313
return embedded
14+
15+
def preprocess_pong(image):
16+
I = image[35:195] # Crop
17+
I = I[::2, ::2, 0] # Downsample width and height by a factor of 2
18+
I[I == 144] = 0 # Remove background type 1
19+
I[I == 109] = 0 # Remove background type 2
20+
I[I != 0] = 1 # Set remaining elements (paddles, ball, etc.) to 1
21+
return I.astype(np.float).reshape(80, 80, 1)

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ def get_dist(pkgname):
2121
setup(
2222
name = 'mitdeeplearning', # How you named your package folder (MyLib)
2323
packages = ['mitdeeplearning'], # Chose the same as "name"
24-
version = '0.5.0', # Start with a small number and increase it with every change you make
24+
version = '0.5.1', # Start with a small number and increase it with every change you make
2525
license='MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository
2626
description = 'Official software labs for MIT Introduction to Deep Learning (http://introtodeeplearning.com)', # Give a short description about your library
2727
author = 'Alexander Amini', # Type in your name
2828
author_email = '[email protected]', # Type in your E-Mail
2929
url = 'http://introtodeeplearning.com', # Provide either the link to your github or to your website
30-
download_url = 'https://github.com/aamini/introtodeeplearning_labs/archive/v0.5.0.tar.gz', # I explain this later on
30+
download_url = 'https://github.com/aamini/introtodeeplearning_labs/archive/v0.5.1.tar.gz', # I explain this later on
3131
keywords = ['deep learning', 'neural networks', 'tensorflow', 'introduction'], # Keywords that define your package best
3232
install_requires=install_deps,
3333
classifiers=[

0 commit comments

Comments
 (0)