Skip to content

Commit 65c650e

Browse files
committed
Fix: in Setup.py
1 parent a6701d5 commit 65c650e

3 files changed

Lines changed: 30 additions & 31 deletions

File tree

setup.py

100644100755
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ def _minimal_ext_cmd(cmd):
7575

7676
def get_version_info():
7777
# Adding the git rev number needs to be done inside
78-
# write_version_py(), otherwise the import of scipy.version messes
79-
# up the build under Python 3.
8078
FULLVERSION = VERSION
8179
if os.path.exists('.git'):
8280
GIT_REVISION = git_version()
@@ -91,7 +89,7 @@ def get_version_info():
9189

9290
def write_version_py(filename='src/pythonDnn/version.py'):
9391
cnt = """
94-
# THIS FILE IS GENERATED FROM SCIPY SETUP.PY
92+
# THIS FILE IS GENERATED FROM SETUP.PY
9593
short_version = '%(version)s'
9694
version = '%(version)s'
9795
full_version = '%(full_version)s'
@@ -120,23 +118,23 @@ def write_version_py(filename='src/pythonDnn/version.py'):
120118
import theano
121119
requires=[]
122120
except ImportError:
123-
requires=['theano>=0.7.0']
121+
requires=['theano>=0.7.0']
124122

125123
metadata = dict(
126124
name = 'pythonDnn',
127-
maintainer = "pythonDnn",
128-
maintainer_email = "pythonDnn@ex.org",
125+
maintainer = "Abil N George,Sudharshan GK",
126+
maintainer_email = "mail@abilng.in,sudharpun90@gmail.com",
129127
description = DOCLINES[0],
130128
long_description = "\n".join(DOCLINES[2:]),
131129
url = "https://github.com/IITM-DONLAB/python-dnn",
132130
download_url = "https://github.com/IITM-DONLAB/python-dnn/zipball/master",
133131
license = 'Apache v2.0 License',
134132
packages = [
135-
'pythonDnn.io_modules', 'pythonDnn.layers', 'pythonDnn.models',
133+
'pythonDnn','pythonDnn.io_modules', 'pythonDnn.layers', 'pythonDnn.models',
136134
'pythonDnn.run', 'pythonDnn.utils'],
137-
package_dir = {'': 'src'},
135+
package_dir = {'pythonDnn': 'src/pythonDnn'},
138136
install_requires = requires,
139-
zip_safe=False,
137+
zip_safe=True,
140138
cmdclass={'clean': CleanCommand,},
141139
)
142140
FULLVERSION, GIT_REVISION = get_version_info()

src/pythonDnn/io_modules/file_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ def read_next_partition_data(self,already_read=0,pad_zeros=False,makeShared=True
283283
#self.feat=[]
284284
fvalues = []
285285
cur_frame_num = 0
286-
while cur_frame_num < self.frames_per_partition-already_read:
286+
while ((cur_frame_num < self.frames_per_partition-already_read) or self.frames_per_partition==float('inf')):
287287
values = self.filehandle.readline().split()
288288
if values.__len__()==0: #No more values available in the data file
289289
break;
@@ -387,7 +387,7 @@ def read_next_partition_data(self,already_read=0,pad_zeros=False,makeShared=True
387387
cur_frame_num = 0
388388
feat = []
389389
label = []
390-
while cur_frame_num < self.frames_per_partition-already_read :
390+
while ((cur_frame_num < self.frames_per_partition-already_read) or self.frames_per_partition==float('inf')):
391391

392392
if not self.filehandles[self.last_class_idx].finished:
393393
#if TD is not finshed.

src/pythonDnn/layers/pool.py

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
import theano.tensor as T
22
from util.max_pool import max_pool_3d
3-
3+
44
class PoolLayer(object):
5-
""" Subsampling and pooling layer """
6-
def __init__(self, input, pool_shape, method="max"):
7-
"""
8-
method: "max", "avg", "L2", "L4", ...
9-
"""
10-
#self.__dict__.update(locals())
11-
#del self.self
12-
if len(pool_shape) == 0:
13-
self.output=input;
14-
return
15-
if method=="max":
16-
if len(pool_shape) == 3:
17-
max_pool = max_pool_3d;
5+
""" Subsampling and pooling layer """
6+
def __init__(self, input, pool_shape, method="max"):
7+
"""
8+
method: "max", "avg", "L2", "L4", ...
9+
"""
10+
#self.__dict__.update(locals())
11+
#del self.self
12+
if len(pool_shape) == 0:
13+
self.output=input;
14+
return
15+
if method=="max":
16+
if len(pool_shape) == 3:
17+
max_pool = max_pool_3d;
18+
else:
19+
from theano.tensor.signal import downsample
20+
max_pool = downsample.max_pool_2d
21+
out = max_pool(input=input,ds=pool_shape,ignore_border=True)
1822
else:
19-
from theano.tensor.signal import downsample
20-
max_pool = downsample.max_pool_2d
21-
out = max_pool(input=input,ds=pool_shape,ignore_border=True)
22-
else:
23-
raise NotImplementedError()
24-
self.output = out
23+
raise NotImplementedError()
24+
self.output = out
25+

0 commit comments

Comments
 (0)