deepinsight / deepinsight/insightface

When using Python 3, I found a very strange problem. Please let me know. Thank you very much

Open
#1,103 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
29.7k
Forks
6.1k
PR merge metrics
No merged PRs in 30d

Description

call reset()
Traceback (most recent call last):
File "train.py", line 1025, in
main()
File "train.py", line 1022, in main
train_net(args)
File "train.py", line 1016, in train_net
epoch_end_callback = epoch_cb )
File "/home/xl/anaconda3/envs/test/lib/python3.5/site-packages/mxnet/module/base_module.py", line 520, in fit
next_data_batch = next(data_iter)
File "/home/xl/anaconda3/envs/test/lib/python3.5/site-packages/mxnet/io/io.py", line 230, in __next__
return self.next()
File "/home/xl/1mxnetinsight/insightface-master/src/data.py", line 860, in next
self.reset()
File "/home/xl/1mxnetinsight/insightface-master/src/data.py", line 753, in reset
random.shuffle(self.seq)
File "/home/xl/anaconda3/envs/test/lib/python3.5/random.py", line 281, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: 'range' object does not support item assignment
(test) xl@xl-Alienware-13-R3:~/1mxnetinsight/insightface-master/src$

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/data.py:753, where reset() calls random.shuffle(self.seq), and inspect how self.seq is initialized. Reproduce the training run from train.py and confirm that reset() completes under Python 3 without the reported TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.