首页 > 解决方案 > FileNotFoundError:[Errno 2] 没有这样的文件或目录:'content/movies_fights/'

问题描述

我从 kaggle 下载了数据集,在 colab 中运行它时显示以下错误。

这是代码>>>

import os

k = 1
cross_validation = 5

datasets_path = ['content/movies_fights/', 'content/hockey_fights/', 'content/violent_flows/']
data_set = datasets_path[0]

split_f1_Train, split_f1_Test, split_f2_Train, split_f2_Test = list(), list(), list(), list()
f1x, f2x = list(), list()

for file in os.listdir(data_set):
    if file.split(' ')[0] == 'NV':
        f1x.append(file)
    else:
        f2x.append(file)

标签: pythongoogle-colaboratorykaggle

解决方案


推荐阅读