Returns a metadata property associated with a DataNode Parameters ---------- key : str The name of the metadata item. Currently supported: "source_info" - the file name or location in the dataset where the data originated
(self, key, *, device="cpu")
| 331 | return fn._shape(self, dtype=dtype, device=device) |
| 332 | |
| 333 | def property(self, key, *, device="cpu"): |
| 334 | """Returns a metadata property associated with a DataNode |
| 335 | |
| 336 | Parameters |
| 337 | ---------- |
| 338 | key : str |
| 339 | The name of the metadata item. Currently supported: |
| 340 | "source_info" - the file name or location in the dataset where the data originated |
| 341 | (each sample is a 1D uint8 tensor) |
| 342 | "layout" - the layout string |
| 343 | (each sample is a 1D uint8 tensor) |
| 344 | device : str, optional |
| 345 | The device, where the value is returned; defaults to CPU. |
| 346 | """ |
| 347 | |
| 348 | from . import fn |
| 349 | |
| 350 | if device == "cpu": |
| 351 | self._check_gpu2cpu() |
| 352 | |
| 353 | return fn.get_property(self, key=key, device=device) |
| 354 | |
| 355 | def source_info(self, *, device="cpu"): |
| 356 | """Returns the "source_info" property. Equivalent to self.meta("source_info").""" |
no test coverage detected