Source Idx1
Loads records from an IDX1 file
- class dffml.source.idx1.IDX1Source(config)[source]
Source to read files in IDX1 format (such as MNIST digit label dataset).
- CONFIG
alias of
dffml.source.idx1.IDX1SourceConfig
- class dffml.source.idx1.IDX1SourceConfig(filename: str, feature: str, readwrite: bool = False, allowempty: bool = False)[source]
- class dffml.source.idx1.IDXSourceConfig(filename: str, feature: str, readwrite: bool = False, allowempty: bool = False)[source]
- no_enforce_immutable()
By default, all properties of a config object are immutable. If you would like to mutate immutable properties, you must explicitly call this method using it as a context manager.
Examples
>>> from dffml import config >>> >>> @config ... class MyConfig: ... C: int >>> >>> config = MyConfig(C=2) >>> with config.no_enforce_immutable(): ... config.C = 1