microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.53k stars 4.28k forks source link

When I try "Testing your CNTK install with Python", my python crash #2841

Closed xiangyubo closed 6 years ago

xiangyubo commented 6 years ago

I installed Anaconda successfully, and I installed cntk successfully. But when I follow the tutorial, my python crash... here is my environment: Python 3.5.2 :: Anaconda 4.1.1 (64-bit) cntk.version 2.3.1 when I run Tutorials/NumpyInterop example from pycharm, I get this:

Selected CPU as the process wide default device.

Build info:

    Built time: Dec  5 2017 18:19:12
    Last modified date: Mon Nov 13 23:00:38 2017
    Build type: Release
    Build target: CPU-only
    With 1bit-SGD: no
    With ASGD: yes
    Math lib: mkl
    Build Branch: HEAD
    Build SHA1: ce72a557b02b30a52c965a237b124688035f720f
    MPI distribution: Microsoft MPI
    MPI version: 7.0.12437.6

Process finished with exit code -1066598274 (0xC06D007E)

manikjindal commented 6 years ago

@xiangyubo How did you try to run the example? Is it from terminal in PyCharm? Are you able to execute the same example from Anaconda prompt using the same environment?

xiangyubo commented 6 years ago

It's from terminal in PyCharm. I also execute the same example in cmd, and python crash.

manikjindal commented 6 years ago

Could you please check the same with CNTK 2.4? Please re-open the issue if it persist with CNTK 2.4.

nikitbiraj commented 6 years ago

I have the same issue. python crashes when trainer module is called. Any idea how to resolve the issue?

thiagocrepaldi commented 6 years ago

CNTK 2.5 packages don't have MKL, CUDA and OpenCV embedded on its Python packages. It is required to pre-install them before using. Refer to https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Windows-Python?tabs=cntkpy25#environment-variables-and-required-packages or https://docs.microsoft.com/en-us/cognitive-toolkit/Setup-Linux-Python?tabs=cntkpy25#environment-variables-and-required-packages for a step by step setup guide

nikitbiraj commented 6 years ago

Thanks. It's working now. issue with MKL packages.

xiangyubo commented 6 years ago

OK, I will try ! Thank you!

obu80 commented 6 years ago

i have the same problem with both cpu and gpu versions of cntk Process finished with exit code -1066598274 (0xC06D007E) I also downloaded MKL and added its lib folder to the system path. Still problem is not resolved. Is there a solution for this problem? Thank you

thiagocrepaldi commented 6 years ago

Could you try CNTK 2.6?

obu80 commented 6 years ago

I am trying with the latest version of cntk. I install it in miniconda with pip install cntk-gpu or pip install cntk commands. Both give the same error. Python version is 3.6. Thank you for your help.

thiagocrepaldi commented 6 years ago

Got it. Could you also try using Python 3.5 instead? Some users reported that python 3.6 environments (from some miniconda/anaconda releases) would not recognize MKL library path (and possibly other external dependencies).

obu80 commented 6 years ago

OK i will try that, thank you

obu80 commented 5 years ago

I tried with python 3.5.6 and cntk 2.3.1, the same problem persists. I dont know why?

obu80 commented 5 years ago

I could not solve the problem with various python and cntk versions. I also installed versions of python/cntk which successfully works in another machine, but the same problem still occurs in the target machine.

It gives the following errror "Process finished with exit code -1066598274 (0xC06D007E)" exactly in trainer = cntk_py.trainer_impl(model, loss_function, eval_function, parameter_learners, progress_writers) line.

In the above function call, only "model" equals to "None"

mattans commented 2 years ago

This still happens in latest CNTK (2.7) and Python 3.6 Will try to install the components in @thiagocrepaldi 's links

Update: after adding the mklml files, still crashed on PyCharm terminal. In Anaconda Prompt, after conda install -c intel mkl-dnn , it worked.