(cls, src: TokenizedVisionData)
| 72 | |
| 73 | @classmethod |
| 74 | def get_spec(cls, src: TokenizedVisionData) -> Dict[str, 'TensorSpec']: |
| 75 | spec = {} if src.other_data is None else src.other_data |
| 76 | for k in ["tokens", "images", "image_masks", "token_pooling", "low_res_token_pooling"]: |
| 77 | v = getattr(src, k) |
| 78 | if v is not None: |
| 79 | spec[k] = TensorSpec.build(getattr(src, k)) |
| 80 | return spec |
| 81 | |
| 82 | @staticmethod |
| 83 | def max(*other: 'TensorSpec'): |
no test coverage detected