• Glenn Jocher's avatar
    Create date_modified() (#2616) · 0ff5aeca
    Glenn Jocher 提交于
    Updated device selection string with fallback for non-git directories.
    ```python
    def select_device(device='', batch_size=None):
        # device = 'cpu' or '0' or '0,1,2,3'
        s = f'YOLOv5 🚀 {git_describe() or date_modified()} torch {torch.__version__} '  # string
    ...
    ```
    0ff5aeca
torch_utils.py 12.1 KB