Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: list index out of range #28

Open
CZL-96 opened this issue Jun 21, 2020 · 2 comments
Open

IndexError: list index out of range #28

CZL-96 opened this issue Jun 21, 2020 · 2 comments

Comments

@CZL-96
Copy link

CZL-96 commented Jun 21, 2020

Could you tell me how to deal with this kind of problem when training

2020-06-21 22:49:36.547439: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0
2020-06-21 22:49:36.550579: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N
2020-06-21 22:49:36.553213: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8797 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
Traceback (most recent call last):
File "run.py", line 140, in
main()
File "run.py", line 136, in main
agent=Agent(param)
File "E:\目标检测\Deep-Learning-Approach-for-Surface-Defect-Detection-master\agent.py", line 15, in init
self.init_datasets() #初始化数据管理器
File "E:\目标检测\Deep-Learning-Approach-for-Surface-Defect-Detection-master\agent.py", line 30, in init_datasets
self.Positive_data_list,self.Negative_data_list=self.listData1(self.__Param["data_dir"])
File "E:\目标检测\Deep-Learning-Approach-for-Surface-Defect-Detection-master\agent.py", line 170, in listData1
example_dirs = [x[1] for x in os.walk(data_dir)][0]
IndexError: list index out of range

@ZhangZhiHao233
Copy link

It maybe the problem about your datasets.

@Vogeeker
Copy link

Could you tell me how to deal with this kind of problem when training

2020-06-21 22:49:36.547439: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988] 0
2020-06-21 22:49:36.550579: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0: N
2020-06-21 22:49:36.553213: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 8797 MB memory) -> physical GPU (device: 0, name: GeForce GTX 1080 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
Traceback (most recent call last):
File "run.py", line 140, in
main()
File "run.py", line 136, in main
agent=Agent(param)
File "E:\目标检测\Deep-Learning-Approach-for-Surface-Defect-Detection-master\agent.py", line 15, in init
self.init_datasets() #初始化数据管理器
File "E:\目标检测\Deep-Learning-Approach-for-Surface-Defect-Detection-master\agent.py", line 30, in init_datasets
self.Positive_data_list,self.Negative_data_list=self.listData1(self.__Param["data_dir"])
File "E:\目标检测\Deep-Learning-Approach-for-Surface-Defect-Detection-master\agent.py", line 170, in listData1
example_dirs = [x[1] for x in os.walk(data_dir)][0]
IndexError: list index out of range

I Solve the problem by change the dir. Not (../xxx/xxx), but(./xxx/xxx)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants