Skip to content

Commit 5fd5fce

Browse files
authored
Merge pull request #3 from uetchy/python3
Add compatibility for Python 3 by @uetchy
2 parents 0166695 + b3bd432 commit 5fd5fce

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

squeezenet.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
from keras.layers import Input, merge
23
from keras.layers.convolutional import Convolution2D, MaxPooling2D
34
from keras.layers.core import Dropout, Activation
@@ -76,16 +77,16 @@ def get_squeezenet(nb_classes, dim_ordering='tf'):
7677
model = get_squeezenet(1000)
7778

7879
duration = time.time() - start
79-
print "{} s to make model".format(duration)
80+
print("{} s to make model".format(duration))
8081

8182
start = time.time()
8283
model.output
8384
duration = time.time() - start
84-
print "{} s to get output".format(duration)
85+
print("{} s to get output".format(duration))
8586

8687
start = time.time()
8788
model.compile(loss="categorical_crossentropy", optimizer="adam")
8889
duration = time.time() - start
89-
print "{} s to get compile".format(duration)
90+
print("{} s to get compile".format(duration))
9091

9192
plot(model, to_file='images/SqueezeNet.png', show_shapes=True)

0 commit comments

Comments
 (0)