(x)
| 69 | return isinstance(x, tuple) or isinstance(x, list) |
| 70 | |
| 71 | def should_cache(x): |
| 72 | if is_nested(x): |
| 73 | # Fast-fail version of all(should_cache) |
| 74 | for y in x: |
| 75 | if not should_cache(y): |
| 76 | return False |
| 77 | return True |
| 78 | return isinstance(x, torch.nn.parameter.Parameter) and \ |
| 79 | type_string(x) == 'FloatTensor' |
| 80 | |
| 81 | def collect_fp_tensor_types(args, kwargs): |
| 82 | def collect_types(x, types): |
nothing calls this directly
no test coverage detected