changeset 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 a96fa4de06d2
children de3aef84714a
files datasets/ftfile.py
diffstat 1 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/datasets/ftfile.py	Wed Mar 10 16:52:22 2010 -0500
+++ b/datasets/ftfile.py	Wed Mar 10 17:01:02 2010 -0500
@@ -193,12 +193,19 @@
         if valid_data is None:
             total_valid_size = sum(FTFile(td).size for td in test_data)
             valid_size = total_valid_size/len(train_data)
-            self._train = FTData(train_data, train_lbl, size=-valid_size)
-            self._valid = FTData(train_data, train_lbl, skip=-valid_size)
+            self._train = FTData(train_data, train_lbl, size=-valid_size,
+                    inscale=inscale, outscale=outscale, indtype=indtype,
+                    outdtype=outdtype)
+            self._valid = FTData(train_data, train_lbl, skip=-valid_size,
+                    inscale=inscale, outscale=outscale, indtype=indtype, 
+                    outdtype=outdtype)
         else:
-            self._train = FTData(train_data, train_lbl)
-            self._valid = FTData(valid_data, valid_lbl)
-        self._test = FTData(test_data, test_lbl)
+            self._train = FTData(train_data, train_lbl,inscale=inscale,
+                    outscale=outscale, indtype=indtype, outdtype=outdtype)
+            self._valid = FTData(valid_data, valid_lbl,inscale=inscale,
+                    outscale=outscale, indtype=indtype, outdtype=outdtype)
+        self._test = FTData(test_data, test_lbl,inscale=inscale,
+                outscale=outscale, indtype=indtype, outdtype=outdtype)
 
     def _return_it(self, batchsize, bufsize, ftdata):
         return izip(DataIterator(ftdata.open_inputs(), batchsize, bufsize),