(m)
| 360 | |
| 361 | |
| 362 | def attribute(m): |
| 363 | old_attrs[m] = dict() |
| 364 | for i in dir(m): |
| 365 | e = getattr(m, i) |
| 366 | exclude_functions = ["is_cuda", "has_names", "numel", "stride", "Tensor", "is_contiguous", "__class__"] |
| 367 | if i not in exclude_functions and not i.startswith("_") and "__call__" in dir(e): |
| 368 | try: |
| 369 | old_attrs[m][i] = e |
| 370 | setattr(m, i, check_wrapper(e)) |
| 371 | except Exception as e: |
| 372 | print(i) |
| 373 | print(e) |
| 374 | |
| 375 | |
| 376 | attribute(torch.Tensor) |
no test coverage detected