Merge pull request #50 from CSTR-Edinburgh/mlp2017-8/lab1
Mlp2017 8/lab1
This commit is contained in:
commit
4f78670bc8
@ -133,11 +133,11 @@ class MNISTDataProvider(DataProvider):
|
||||
super(MNISTDataProvider, self).__init__(
|
||||
inputs, targets, batch_size, max_num_batches, shuffle_order, rng)
|
||||
|
||||
def next(self):
|
||||
"""Returns next data batch or raises `StopIteration` if at end."""
|
||||
inputs_batch, targets_batch = super(MNISTDataProvider, self).next()
|
||||
return inputs_batch, self.to_one_of_k(targets_batch)
|
||||
|
||||
# def next(self):
|
||||
# """Returns next data batch or raises `StopIteration` if at end."""
|
||||
# inputs_batch, targets_batch = super(MNISTDataProvider, self).next()
|
||||
# return inputs_batch, self.to_one_of_k(targets_batch)
|
||||
#
|
||||
def __next__(self):
|
||||
return self.next()
|
||||
|
||||
@ -202,3 +202,5 @@ class MetOfficeDataProvider(DataProvider):
|
||||
# initialise base class with inputs and targets arrays
|
||||
# super(MetOfficeDataProvider, self).__init__(
|
||||
# inputs, targets, batch_size, max_num_batches, shuffle_order, rng)
|
||||
def __next__(self):
|
||||
return self.next()
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user