Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c73eec5
Created europal.py data itterator. Currently needs europal data unpac…
Jeremy-E-Johnson Jun 18, 2016
4a1d2c2
updating europarl iterator
Jun 18, 2016
2939ac6
Merge branch 'development' of https://github.com/rdevon/cortex into d…
Jeremy-E-Johnson Jun 19, 2016
d05b612
Merge branch 'development' of https://github.com/Jeremy-E-Johnson/cor…
Jun 19, 2016
21542d7
Created test for europarl.py. Checks shapes and masks.
Jeremy-E-Johnson Jun 19, 2016
665283e
Added support for max_length, added some documentation, removed some …
Jeremy-E-Johnson Jun 19, 2016
e8cfe60
Fixed bug where words that only appeared in sentences that are too lo…
Jeremy-E-Johnson Jun 19, 2016
fdbb438
Fixed path sourcing for data loading, and added europarl to supported…
Jeremy-E-Johnson Jun 19, 2016
7e72540
Added __init__ to demos_basic/tests to make imports for tests work be…
Jeremy-E-Johnson Jun 20, 2016
5ef70a1
Start of an RNN demo.
Jeremy-E-Johnson Jun 20, 2016
38dd209
Added field (self.dimall) for holding all dimensions of data. (useful…
Jeremy-E-Johnson Jun 20, 2016
65b767a
Fixed source path.
Jeremy-E-Johnson Jun 20, 2016
c796f5a
Added functionality for not counting words that appear in corrosponde…
Jeremy-E-Johnson Jun 20, 2016
b84c88f
Added _vis(). Appears to be functional.
Jeremy-E-Johnson Jun 20, 2016
a88a6c2
Added voc.py the start of a 2D classification dataset iterator class.
Jeremy-E-Johnson Jun 24, 2016
6e11504
Added pyramid_rnn model and basic tests for its construction and step…
Jeremy-E-Johnson Jun 24, 2016
8688d75
Working on the __call__ function. Not currently functional.
Jeremy-E-Johnson Jun 24, 2016
2cb1caa
Test for new __call__ function added.
Jeremy-E-Johnson Jun 24, 2016
ee2236f
Tests constructor for voc data iterator.
Jeremy-E-Johnson Jun 24, 2016
eff32b8
Tests and minor bug fixes. Normalized outputs.
Jeremy-E-Johnson Jun 24, 2016
af3d9d5
Trying to get a successful demo running. Has a lot of debugging mess …
Jeremy-E-Johnson Jun 29, 2016
b8275cb
Added factory, support for train/valid/test modes, and fixed output t…
Jeremy-E-Johnson Jun 29, 2016
a6400ab
Attempted to get demo running. Not currently working. Has much excess…
Jeremy-E-Johnson Jun 29, 2016
7c468ce
Added support for VOC dataset.
Jeremy-E-Johnson Jul 21, 2016
578ca1d
Bugfixes and cleanup for demo.
Jeremy-E-Johnson Jul 21, 2016
90e37a5
Bugfix, demo runs now but doesnt seem to train particularly well.
Jeremy-E-Johnson Jul 21, 2016
09f7eb8
Added support for masked input.
Jeremy-E-Johnson Jul 21, 2016
2de7e89
Fixed up __call__ test which should work now.
Jeremy-E-Johnson Jul 21, 2016
4ec1f81
Added chunk_size specifier to arguments. Trivial change.
Jeremy-E-Johnson Jul 21, 2016
638fccc
These changes make no sense but without either or both of them the py…
Jeremy-E-Johnson Jul 21, 2016
5c8b463
Fixed an issue with training data being binary and a docstring typo.
Jeremy-E-Johnson Jul 21, 2016
608eccf
Removed unnecessary print statement.
Jeremy-E-Johnson Jul 21, 2016
78c5274
Removed reversal of input order.
Jeremy-E-Johnson Jul 22, 2016
4f83fe1
Removed reversal of input order.
Jeremy-E-Johnson Jul 22, 2016
bf89938
Fixed some name shadowing through scopes.
Jeremy-E-Johnson Jul 22, 2016
77ebe3a
Added proper test for __call__ function that compares it to numpy cal…
Jeremy-E-Johnson Jul 22, 2016
e40bdd3
Cleaned up __call__ a little bit.
Jeremy-E-Johnson Jul 22, 2016
fe4e639
Made cost function work with adjusted pyramid_rnn code and removed th…
Jeremy-E-Johnson Jul 22, 2016
b29a0cd
Started preparing visuals.
Jeremy-E-Johnson Jul 28, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions cortex/datasets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ def resolve(c):
from .basic.caltech import CALTECH
from .basic.uci import UCI
from .basic.cifar import CIFAR
from .basic.europarl import Europarl
from .basic.voc import VOC

r_dict = {
'mnist': MNIST,
'cifar': CIFAR,
'caltech': CALTECH,
'uci': UCI
'uci': UCI,
'europarl': Europarl,
'voc': VOC
}

C = r_dict.get(c, None)
Expand All @@ -70,7 +74,7 @@ def make_one_hot(Y, n_classes=None):
class_list = np.unique(Y).tolist()
n_classes = len(class_list)
else:
class_list = range(n_classes)
class_list = range(0, n_classes)

if Y.ndim == 2:
reshape = Y.shape
Expand All @@ -86,7 +90,7 @@ def make_one_hot(Y, n_classes=None):
i = class_list.index(Y[idx])
except ValueError:
raise ValueError('Class list is missing elements')
O[idx, i] = 1.;
O[idx, i] = 1.

if reshape is not None:
O = O.reshape(reshape + (n_classes,))
Expand Down Expand Up @@ -176,7 +180,7 @@ def dataset_factory(resolve_dataset, dataset=None, split=[0.7, 0.2, 0.1],
valid_batch_size=valid_batch_size, test_batch_size=test_batch_size,
**dataset_args)
else:
train, valid, test, idx = C.factory(
train, valid, test, idx = C.factory(
split=split, idx=idx,
batch_sizes=[train_batch_size, valid_batch_size, test_batch_size],
**dataset_args)
Expand Down Expand Up @@ -367,6 +371,7 @@ def __init__(self, data, distributions=None, labels='label', name=None,
self.balance = balance

self.dims = dict()
self.dimsall = dict()
if distributions is None:
self.distributions = dict()
else:
Expand All @@ -391,6 +396,7 @@ def __init__(self, data, distributions=None, labels='label', name=None,
'number of samples (shape[0]), '
'(%d vs %d)' % (self.n, v.shape[0]))
self.dims[k] = v.shape[1]
self.dimsall[k] = v.shape
if not k in self.distributions.keys():
self.distributions[k] = 'binomial'

Expand Down
Loading