(self, name)
| 52 | ) |
| 53 | |
| 54 | def __getattr__(self, name): |
| 55 | if hasattr(F, name): |
| 56 | return getattr(F, name) |
| 57 | try: |
| 58 | import torchvision.transforms.v2.functional as v2_F |
| 59 | |
| 60 | if hasattr(v2_F, name): |
| 61 | return getattr(v2_F, name) |
| 62 | except ImportError: |
| 63 | pass |
| 64 | raise AttributeError(f"'{name}' not found in functional_tensor mock") |
| 65 | |
| 66 | sys.modules["torchvision.transforms.functional_tensor"] = FunctionalTensorMock() |
| 67 | return True |
nothing calls this directly
no outgoing calls
no test coverage detected