小编Raj*_*sad的帖子

在 Windows 平台上安装 OpenEXR 时出错

我在 Windows 平台上安装 OpenEXR 时遇到问题。我用pip install OpenEXR

ERROR: Command errored out with exit status 1:
     command: 'd:\dl-3d\gridding_residual_network\scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-5adtpb33\\openexr_a32133
8e34444c229fc2744bf45c44e2\\setup.py'"'"'; __file__='"'"'C:\\Users\\anujp\\AppData\\Local\\Temp\\pip-install-5adtpb33\\openexr_a321338e34444c229fc2744bf45c44e2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"
'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\anujp\AppData\Local\Temp\pip-record-rpd0410_\inst
all-record.txt' --single-version-externally-managed --compile --install-headers 'd:\dl-3d\gridding_residual_network\include\site\python3.7\OpenEXR'
         cwd: C:\Users\anujp\AppData\Local\Temp\pip-install-5adtpb33\openexr_a321338e34444c229fc2744bf45c44e2\
    Complete output (15 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.7
    copying Imath.py -> build\lib.win-amd64-3.7
    running build_ext
    building 'OpenEXR' extension
    creating build\temp.win-amd64-3.7
    creating build\temp.win-amd64-3.7\Release
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox …
Run Code Online (Sandbox Code Playgroud)

python openexr

1
推荐指数
1
解决办法
3043
查看次数

Tensorflow 中的 KFold 交叉验证

我正在尝试使用神经网络中的 sklearn 和 Tensorflow 包来实现 KFold 验证。

我的代码看起来像这样。

def training(self):
    n_split = 3
    instances = self.instance
    labels = self.labels
    for train_index, test_index in KFold(n_split).split(instances):
        x_train, x_test = instances[train_index], instances[test_index]
        y_train, y_test = labels[train_index], labels[test_index]
        model = self.mlp_model()
        model.fit(x_train, y_train, epochs=20)

        print('Model Evaluation', model.evaluate(x_test, y_test))
Run Code Online (Sandbox Code Playgroud)

不幸的是,我收到一个错误

raise KeyError(f"None of [{key}] are in the [{axis_name}]")
KeyError: "None of [Int64Index([160, 161, 162, 163, 164, 165, 166, 167, 168, 169,\n            ...\n            468, 469, 470, 471, 472, 473, 474, 475, 476, 477],\n           dtype='int64', length=318)] are …
Run Code Online (Sandbox Code Playgroud)

python machine-learning deep-learning tensorflow k-fold

1
推荐指数
1
解决办法
3835
查看次数