Get a spatial cache.
(self, key=None)
| 782 | self._spatial_cache[scale_key][key] = value |
| 783 | |
| 784 | def get_spatial_cache(self, key=None): |
| 785 | """ |
| 786 | Get a spatial cache. |
| 787 | """ |
| 788 | scale_key = str(self._scale) |
| 789 | cur_scale_cache = self._spatial_cache.get(scale_key, {}) |
| 790 | if key is None: |
| 791 | return cur_scale_cache |
| 792 | return cur_scale_cache.get(key, None) |
| 793 | |
| 794 | def __repr__(self) -> str: |
| 795 | return f"SparseTensor(shape={self.shape}, dtype={self.dtype}, device={self.device})" |
no outgoing calls
no test coverage detected