Skip to content

TypeError: slice indices must be integers or None or have an __index__ method #17

Description

@zhoufengfan

After I run lfw_eval.py, there occurred this error:

Traceback (most recent call last):
  File "lfw_eval.py", line 122, in <module>
    _, result = eval(net.sphere().to('cuda'), model_path='checkpoint/CosFace_24_checkpoint.pth')
  File "lfw_eval.py", line 109, in eval
    folds = KFold(n=6000, n_folds=10)
  File "lfw_eval.py", line 38, in KFold
    test = base[i * n / n_folds:(i + 1) * n / n_folds]
TypeError: slice indices must be integers or None or have an __index__ method

I found that if I run the KFold() solely, there still occurs this error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions