comparison datasets/ftfile.py @ 214:1faae5079522

The in/outscale parameters were not passed to FTData
author Dumitru Erhan <dumitru.erhan@gmail.com>
date Wed, 10 Mar 2010 17:01:02 -0500
parents f0f47b045cbf
children 966272e7f14b
comparison
equal deleted inserted replaced
213:a96fa4de06d2 214:1faae5079522
191 set. 191 set.
192 """ 192 """
193 if valid_data is None: 193 if valid_data is None:
194 total_valid_size = sum(FTFile(td).size for td in test_data) 194 total_valid_size = sum(FTFile(td).size for td in test_data)
195 valid_size = total_valid_size/len(train_data) 195 valid_size = total_valid_size/len(train_data)
196 self._train = FTData(train_data, train_lbl, size=-valid_size) 196 self._train = FTData(train_data, train_lbl, size=-valid_size,
197 self._valid = FTData(train_data, train_lbl, skip=-valid_size) 197 inscale=inscale, outscale=outscale, indtype=indtype,
198 outdtype=outdtype)
199 self._valid = FTData(train_data, train_lbl, skip=-valid_size,
200 inscale=inscale, outscale=outscale, indtype=indtype,
201 outdtype=outdtype)
198 else: 202 else:
199 self._train = FTData(train_data, train_lbl) 203 self._train = FTData(train_data, train_lbl,inscale=inscale,
200 self._valid = FTData(valid_data, valid_lbl) 204 outscale=outscale, indtype=indtype, outdtype=outdtype)
201 self._test = FTData(test_data, test_lbl) 205 self._valid = FTData(valid_data, valid_lbl,inscale=inscale,
206 outscale=outscale, indtype=indtype, outdtype=outdtype)
207 self._test = FTData(test_data, test_lbl,inscale=inscale,
208 outscale=outscale, indtype=indtype, outdtype=outdtype)
202 209
203 def _return_it(self, batchsize, bufsize, ftdata): 210 def _return_it(self, batchsize, bufsize, ftdata):
204 return izip(DataIterator(ftdata.open_inputs(), batchsize, bufsize), 211 return izip(DataIterator(ftdata.open_inputs(), batchsize, bufsize),
205 DataIterator(ftdata.open_outputs(), batchsize, bufsize)) 212 DataIterator(ftdata.open_outputs(), batchsize, bufsize))