Python fuel.datasets.Dataset() Examples
The following are 6
code examples of fuel.datasets.Dataset().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
fuel.datasets
, or try the search function
.
Example #1
Source File: test_datasets.py From attention-lvcsr with MIT License | 5 votes |
def test_value_error_on_no_provided_sources(self): class FaultyDataset(Dataset): def get_data(self, state=None, request=None): pass assert_raises(ValueError, FaultyDataset, self.data)
Example #2
Source File: test_datasets.py From attention-lvcsr with MIT License | 5 votes |
def test_attribute_error_on_no_example_iteration_scheme(self): class FaultyDataset(Dataset): provides_sources = ('data',) def get_data(self, state=None, request=None): pass def get_example_iteration_scheme(): return FaultyDataset().example_iteration_scheme assert_raises(AttributeError, get_example_iteration_scheme)
Example #3
Source File: test_datasets.py From attention-lvcsr with MIT License | 5 votes |
def test_example_iteration_scheme(self): scheme = ConstantScheme(2) class MinimalDataset(Dataset): provides_sources = ('data',) _example_iteration_scheme = scheme def get_data(self, state=None, request=None): pass assert MinimalDataset().example_iteration_scheme is scheme
Example #4
Source File: test_datasets.py From fuel with MIT License | 5 votes |
def test_value_error_on_no_provided_sources(self): class FaultyDataset(Dataset): def get_data(self, state=None, request=None): pass assert_raises(ValueError, FaultyDataset, self.data)
Example #5
Source File: test_datasets.py From fuel with MIT License | 5 votes |
def test_attribute_error_on_no_example_iteration_scheme(self): class FaultyDataset(Dataset): provides_sources = ('data',) def get_data(self, state=None, request=None): pass def get_example_iteration_scheme(): return FaultyDataset().example_iteration_scheme assert_raises(AttributeError, get_example_iteration_scheme)
Example #6
Source File: test_datasets.py From fuel with MIT License | 5 votes |
def test_example_iteration_scheme(self): scheme = ConstantScheme(2) class MinimalDataset(Dataset): provides_sources = ('data',) _example_iteration_scheme = scheme def get_data(self, state=None, request=None): pass assert MinimalDataset().example_iteration_scheme is scheme