python - 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)
解决方案
推荐阅读
- dart - 无法弄清楚如何从列表中分配正确的答案值
在颤振的多项选择测验中, - javascript - 如何自定义设置原型链(构造函数)?
- angular - 在不丢失上下文的情况下处理结构指令上的调整大小事件
- ios - 是否可以将 UIPanGestureRecognizer 子类化以在达到某个距离阈值后出现它的开始状态
- sql-server - 检查多个 SQL Server .bak 备份文件是否来自同一个备份
- php - PHP:如何修复错误无法解析 XML 数据?
- c++ - 这个带有默认参数的 c++ 代码如何编译?
- php - Laravel:为什么 var_dump/dump/dd 会影响 auth()->login() 函数
- api - api 密钥如何安全地存储在移动应用程序中?
- android - 没有注册 Opkernel 来支持 Op 'SparseSoftmaxCrossEntropyWithLogits'