src/transformers/models/flava/modeling_flava.py/FlavaLosses/all_none
class FlavaLosses:    def all_none(self) -> bool:
        all_none = True
        for v in self.values():
            if v is not None:
                all_none = False
                break
        return all_none