We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Ascend
GPU
CPU
import mindspore as ms import numpy as np output = ms.Tensor(np.array([[1.5, 2.3, 0.7], [1.8, 0.5, 2.2]]), ms.float32) target = ms.Tensor(np.array([1, 2]), ms.int32) loss_var = ms.ops.cross_entropy(output, target) print(loss_var)
When i write the above code in a .ipynb file and run it with jupyter, it throws a ImportError:
--------------------------------------------------------------------------- ImportError Traceback (most recent call last) Cell In[6], line 1 ----> 1 import mindspore as ms 2 import numpy as np 3 output = ms.Tensor(np.array([[1.5, 2.3, 0.7], [1.8, 0.5, 2.2]]), ms.float32) File ~/Applications/Programming/Python/Anaconda3/envs/DlibFuzz/lib/python3.9/site-packages/mindspore/__init__.py:18 15 """.. MindSpore package.""" 16 from __future__ import absolute_import ---> 18 from mindspore.run_check import run_check 19 from mindspore import common, dataset, mindrecord, train, log, amp 20 from mindspore import profiler, communication, numpy, parallel, hal File ~/Applications/Programming/Python/Anaconda3/envs/DlibFuzz/lib/python3.9/site-packages/mindspore/run_check/__init__.py:17 1 # Copyright 2021 Huawei Technologies Co., Ltd 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); (...) 13 # limitations under the License. 14 # ============================================================================ 15 """.. run_check package.""" ---> 17 from ._check_version import check_version_and_env_config 18 from .run_check import run_check 20 __all__ = ['run_check'] File ~/Applications/Programming/Python/Anaconda3/envs/DlibFuzz/lib/python3.9/site-packages/mindspore/run_check/_check_version.py:28 26 import numpy as np 27 from mindspore import log as logger ---> 28 from mindspore._c_expression import MSContext, ms_ctx_param 29 from ..version import __version__ 32 class EnvChecker(metaclass=ABCMeta): ImportError: /home/tly/Applications/Programming/Python/Anaconda3/envs/DlibFuzz/lib/python3.9/site-packages/mindspore/lib/libmindspore_backend.so: undefined symbol: dnnl_threadpool_interop_stream_create
However, When i write the code in a python file and run it with interpreter, it work correctly:
/home/user/Applications/Programming/Python/Anaconda3/bin/conda run -n DlibFuzz --no-capture-output python /mnt/e/1University/Research/DlibFuzz/Code/DlibFuzz/test.py 0.5591624 进程已结束,退出代码为 0
Running .ipynb File: Running .py File:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Environment
Hardware Environment(
Ascend
/GPU
/CPU
): CPUSoftware Environment:
Describe the current behavior
When i write the above code in a .ipynb file and run it with jupyter, it throws a ImportError:
However, When i write the code in a python file and run it with interpreter, it work correctly:
/home/user/Applications/Programming/Python/Anaconda3/bin/conda run -n DlibFuzz --no-capture-output python /mnt/e/1University/Research/DlibFuzz/Code/DlibFuzz/test.py 0.5591624 进程已结束,退出代码为 0
Describe the expected behavior
/home/user/Applications/Programming/Python/Anaconda3/bin/conda run -n DlibFuzz --no-capture-output python /mnt/e/1University/Research/DlibFuzz/Code/DlibFuzz/test.py 0.5591624 进程已结束,退出代码为 0
Steps to reproduce the issue
Related log / screenshot
Running .ipynb File:
Running .py File:
The text was updated successfully, but these errors were encountered: