Coremltools 5.1 on windows 10 gives "Unable to load libmodelpackage" - windows-10

When I installed coremltools 5.1 on windows 10 (version 21H1, build 19043.1348, python 3.7.8) and opened a coreml model, I got the error message "Unable to load libmodelpackage. Cannot make save spec". The mlmodel can be found in this page https://github.com/likedan/Awesome-CoreML-Models
import coremltools
spec = coremltools.utils.load_spec(r"MNIST.mlmodel")
It works well in coremltools 4.1. Do you have any idea about this issue? coremltools 5.x does not support windows anymore? I did not find any information about windows support on the release note of coremltools.
Thank you!

Coremltools never supported windows and version 5.1+ -> https://github.com/apple/coremltools/issues/1348

Related

RuntimeError: Could not load cudnn library. Check your cudnn installation. Maybe using the Theano flag dnn.base_path can help you

enter image description here
I don't know how to solve the problem, although I searched google.
My computer OS is win10. And following installed in a virtual environment.
enter image description here
enter image description here
UserWarning: Your cuDNN version is more recent than
Theano. If you encounter problems, try updating Theano or downgrading cuDNN to a version >= v5 and <= v7.
  warnings.warn("Your cuDNN version is more recent than "
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
RuntimeError: Could not load cudnn library. Check your cudnn installation. Maybe using the Theano flag dnn.base_path can help you. Current value "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1"
I had the same problem, and I solved it like this:
Open dnn.py.
(My path is : F:\Anaconda3\envs\python2_7\Lib\site-packages\theano)
Add 'cudnn64_8.dll' in WIN32_CUDNN_NAMES. WIN32_CUDNN_NAMES = ['cudnn64_8.dll', 'cudnn64_7.dll', 'cudnn64_6.dll', 'cudnn64_5.dll']

Unable to load model trained on Pytotch version 1.6.0 in Pytorch version 1.5.1

I have recently updated my Pytorch version to 1.6.0 on my local machine to use their mixed-precision training, since then I am encountering this issue, I have tried the solution mentioned here, but it is still throwing below error.
RuntimeError: version_ <= kMaxSupportedFileFormatVersion INTERNAL ASSERT FAILED at /opt/conda/conda-bld/pytorch_1591914880026/work/caffe2/serialize/inline_container.cc:132, please report a bug to PyTorch. Attempted to read a PyTorch file with version 4, but the maximum supported version for reading is 3. Your PyTorch installation may be too old.
Link to reproduce: https://www.kaggle.com/rohitsingh9990/error-reproducing-code?scriptVersionId=37468859
Any help will be appreciated, thanks in advance.
In torch.__version__ == 1.6.0 :
torch.save(model_.state_dict(), 'best_model.pth.tar', use_new_zipfile_serialization=False)
then in torch.__version__ == 1.5.1:
torch.load('best_model.pth.tar',map_location='cpu')

Why does PyCharm not realize that tf.keras is installed?

Although tensorflow is installed, Pycharm does not realize that the module tf.keras exists.
Hovering over the keras results in the following text showing up: "Cannot find reference "keras" in '__init__.py'"
Why?
You are using PyCharm version lower than 3.0.
TensorFlow 2.0 is not running on PyCharm versions older than 2019.3 version.
You can find the answer to your question here: Unable to import Keras(from TensorFlow 2.0) in PyCharm

Can not identify the version of imported packages in my Jupyter Notebook

Nothing seems to work when I try to identify the version of an imported package:
What is creating this problem? What can I do about it?
I am using Python 3.7, Anaconda3 (2019) and Windows 10.
If I try it in notebooks.azure.com then everything works just fine:
import tensorflow
tensorflow.__version__
'1.12.2'
You can also try:
!pip show tensorflow
Name: tensorflow
Version: 1.12.2
Summary: TensorFlow is an open source machine learning framework for everyone.
/..../

OpenCL error using Python 3.6 on Windows 10

I am trying to use PyOpenCL for the first time on Windows 10 (64 bit) to accelerate some code using my GPU. When trying to import pyopencl I get the error:
File "C:\Users\me\Anaconda3\lib\site-packages\pyopencl\__init__.py", line 39, in <module>
import pyopencl._cl as _cl
ImportError: DLL load failed: The specified module could not be found."
I am using Python 3.6.8 and have the pyopencl 2018.2.5+cl21 package installed.
I have also just installed the latest CUDA toolkit cuda.10.1.105 and Visual Studio as recommended during the CUDA toolkit installation.
The OpenCl.dll file in the Windows\system32 folder, is the 2.2.1.0 file version. I checked this by going into Computer Management clicking on my Nvidia GeForce GTX 1050 display adaptor.
From other post recommednations, I have tried substituting the OpenCl.dll file by others found in my system (see photo) without results. I have then reverted to the original file located in that folder.
Image for search results of 'OpenCl.dll'
I have also downloaded from and installed pyopencl‑2018.2.5+cl21‑cp36‑cp36m‑win_amd64.whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopencl, without success. The error keeps popping up.
I am completely new to OpenCL, CUDA etc. Please forgive me if the error is easy to solve. Thank you for your help and please let me know if you need any other information.

Resources