Hi. I am having trouble to let the plot (chapter 2.4.1) show up . The same problem as here: https://www.pyimagesearch.com/2015/08/24/resolved-matplotlib-figures-not-showing-up-or-displaying
When I try plain matplotlib without mxnet I see a plot. Does someone know how to fix that? Is there a way to tell the matplotlib in mxnet which backend to use? (is it using a different one than whithout mxnet?) I am using Debian and installed the dependencies with pip and I haven’t conda installed.
Hi, my computer can’t run GPU so i plan to install on Google Colab. Can I do that? If so, please guide me.
I’m on Windows 10, using Anaconda3. Installation of everything succeeded smoothly, but the package d2l cannot be imported.
Upon executing:
from d2l import mxnet as d2l
The kernel failed, and the Jupyter Notebook command prompt window prints:
Traceback (most recent call last):
File “C:\ProgramData\Anaconda3\envs\d2l\lib\runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “C:\ProgramData\Anaconda3\envs\d2l\lib\runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\ipykernel_launcher.py”, line 16, in
app.launch_new_instance()
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\traitlets\config\application.py”, line 844, in launch_instance
app.initialize(argv)
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\traitlets\config\application.py”, line 87, in inner
return method(app, *args, **kwargs)
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\ipykernel\kernelapp.py”, line 570, in initialize
self.write_connection_file()
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\ipykernel\kernelapp.py”, line 230, in write_connection_file
write_connection_file(cf, ip=self.ip, key=self.session.key, transport=self.transport,
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\jupyter_client\connect.py”, line 138, in write_connection_file
with secure_write(fname) as f:
File “C:\ProgramData\Anaconda3\envs\d2l\lib\contextlib.py”, line 113, in enter
return next(self.gen)
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\jupyter_core\paths.py”, line 461, in secure_write
win32_restrict_file_to_user(fname)
File “C:\ProgramData\Anaconda3\envs\d2l\lib\site-packages\jupyter_core\paths.py”, line 387, in win32_restrict_file_to_user
import win32api
ImportError: DLL load failed while importing win32api: The specified module could not be found.
[Update] I tried installing win32api with: conda install win32api (instead of pip). Now it works.
Help!
I have installed mxnet-cu101==1.7.0, for mx250
I try a script ,but I found it have no io.ImageRecordIter(),why? below is my script for windows10
D:\virtualenv\Python36\Scripts\python.exe D:/MyPyCharmProject/neural_network_cnn_vehicle_identification/fine_tune_cars.py
[15:33:22] C:\Jenkins\workspace\mxnet-tag\mxnet\src\io\iter_image_recordio_2.cc:178: ImageRecordIOParser2: raid\datasets\cars\rec\train.rec, use 2 threads for decoding…
[15:33:22] C:\Jenkins\workspace\mxnet-tag\mxnet\src\base.cc:84: Upgrade advisory: this mxnet has been built against cuDNN lib version 7500, which is older than the oldest version tested by CI (7600). Set MXNET_CUDNN_LIB_CHECKING=0 to quiet this warning.
[15:33:27] C:\Jenkins\workspace\mxnet-tag\mxnet\src\io\iter_image_recordio_2.cc:178: ImageRecordIOParser2: raid\datasets\cars\rec\val.rec, use 3 threads for decoding…
[INFO] loading pre-trained model…
[15:33:27] C:\Jenkins\workspace\mxnet-tag\mxnet\src\nnvm\legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade…
[15:33:27] C:\Jenkins\workspace\mxnet-tag\mxnet\src\nnvm\legacy_json_util.cc:217: Symbol successfully upgraded!
[INFO] training network…
Traceback (most recent call last):
File “D:/MyPyCharmProject/neural_network_cnn_vehicle_identification/fine_tune_cars.py”, line 130, in
epoch_end_callback=epochEndCBs)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\base_module.py”, line 533, in fit
self.update_metric(eval_metric, data_batch.label)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\module.py”, line 775, in update_metric
self.exec_group.update_metric(eval_metric, labels, pre_sliced)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\executor_group.py”, line 648, in update_metric
eval_metric.update_dict(labels, preds)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\metric.py”, line 348, in update_dict
metric.update_dict(labels, preds)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\metric.py”, line 132, in update_dict
self.update(label, pred)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\metric.py”, line 493, in update
pred_label = pred_label.asnumpy().astype(‘int32’)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\ndarray\ndarray.py”, line 2566, in asnumpy
ctypes.c_size_t(data.size)))
File “D:\virtualenv\Python36\lib\site-packages\mxnet\base.py”, line 246, in check_call
raise get_last_ffi_error()
mxnet.base.MXNetError: Traceback (most recent call last):
File “c:\jenkins\workspace\mxnet-tag\mxnet\src\storage./pooled_storage_manager.h”, line 161
MXNetError: cudaMalloc retry failed: out of memory
Process finished with exit code 1
Need help
I’m a novice in use mxnet.
resently,I install mxnet-cu101 on my computer (win10),I found these is no moudle ‘ImageRecordIter()’,I
want to know if new version mxnet has cut the function of .
I tried some kind of version (1.5, 1.6 ,1.7 ,2.0), having the same erro in my desktop(750ti gpu),laptop (mx250 gpu)
D:\virtualenv\Python36\Scripts\python.exe D:/MyPyCharmProject/neural_network_cnn_vehicle_identification/fine_tune_cars.py
[09:15:45] C:\Jenkins\workspace\mxnet\mxnet\src\io\iter_image_recordio_2.cc:179: ImageRecordIOParser2: raid\datasets\cars\rec\train.rec, use 2 threads for decoding…
[09:15:45] C:\Jenkins\workspace\mxnet\mxnet\src\base.cc:84: Upgrade advisory: this mxnet has been built against cuDNN lib version 7500, which is older than the oldest version tested by CI (7600). Set MXNET_CUDNN_LIB_CHECKING=0 to quiet this warning.
[09:15:51] C:\Jenkins\workspace\mxnet\mxnet\src\io\iter_image_recordio_2.cc:179: ImageRecordIOParser2: raid\datasets\cars\rec\val.rec, use 3 threads for decoding…
[INFO] loading pre-trained model…
[09:15:51] C:\Jenkins\workspace\mxnet\mxnet\src\nnvm\legacy_json_util.cc:209: Loading symbol saved by previous version v0.8.0. Attempting to upgrade…
[09:15:51] C:\Jenkins\workspace\mxnet\mxnet\src\nnvm\legacy_json_util.cc:217: Symbol successfully upgraded!
[INFO] training network…
Traceback (most recent call last):
File “D:\virtualenv\Python36\lib\site-packages\mxnet\symbol\symbol.py”, line 1833, in simple_bind
ctypes.byref(exe_handle)))
File “D:\virtualenv\Python36\lib\site-packages\mxnet\base.py”, line 246, in check_call
raise get_last_ffi_error()
mxnet.base.MXNetError: Traceback (most recent call last):
File “c:\jenkins\workspace\mxnet\mxnet\src\storage./pooled_storage_manager.h”, line 163
MXNetError: cudaMalloc retry failed: out of memory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “D:/MyPyCharmProject/neural_network_cnn_vehicle_identification/fine_tune_cars.py”, line 130, in
epoch_end_callback=epochEndCBs)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\base_module.py”, line 498, in fit
for_training=True, force_rebind=force_rebind)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\module.py”, line 429, in bind
state_names=self._state_names)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\executor_group.py”, line 280, in init
self.bind_exec(data_shapes, label_shapes, shared_group)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\executor_group.py”, line 384, in bind_exec
shared_group))
File “D:\virtualenv\Python36\lib\site-packages\mxnet\module\executor_group.py”, line 678, in _bind_ith_exec
shared_buffer=shared_data_arrays, **input_shapes)
File “D:\virtualenv\Python36\lib\site-packages\mxnet\symbol\symbol.py”, line 1839, in simple_bind
raise RuntimeError(error_msg)
RuntimeError: simple_bind error. Arguments:
data: (2, 3, 224, 224)
softmax_label: (2,)
Traceback (most recent call last):
File “c:\jenkins\workspace\mxnet\mxnet\src\storage./pooled_storage_manager.h”, line 163
MXNetError: cudaMalloc retry failed: out of memory
Process finished with exit code 1
Hello cheetha
were you able to solve the problem. I have the same problem here. Any help will be greatly appreciated
Hi,
To download D2L notebooks,
when i run the following command “unzip d2l-en.zip && rm d2l-en.zip”
it give the following error
“‘unzip’ is not recognized as an internal or external command, operable program or batch file.”
when i try to install unzip using “pip install unzip” command, i get the following error again:
‘unzip’ is not recognized as an internal or external command,
operable program or batch file.
How to fix it please?
Hello. What’s the mxnet distro for Cuda 11.4? I am on wsl2 and the latest cuda that I got officially installed is 11.4. But you seem to have mxnet cuda-adapted only until 11.2? Will it work also?
Hi,
Thanks for the book. I wonder if some guidance regarding the hardware requirements could make a difference. For example, running code from the Softmax-classification of chapter 3 in a AWS fully managed Jupyter notebook on a ml.t2.medium instance shows some limitations. Not surprisingly, upgrading to a ml.t2.large instance produces an improvement. This deserves further specification. What is the minimum hardware required to run all the examples in the book?
Thanks again,
Omar
Nice step by step tutorial! I wonder as a beginner, what is the recommendation of the framework? Do I need to install 3 of them or I can stick to just one of them?
Hello,
I wanted to install MXNet 2.0 for cuda version 11.4, but there were no instructions regarding how to install it(understandable since it just recently got in beta)
I thought of compiling it from source, however, I saw that the builds for centOS were failing for master(I’m using Fedora 34, so that’s what I concentrated on).
I fathom that the 2.0 release is not far away now since it has entered beta, so I don’t want to feel frustrated upon realizing that my effort to learn mxnet will be for nothing in a few months.
Does it matter that I stick to 1.8.0 for now? Does the book accommodate for the fact that MXNet is undergoing a major overhaul? Should I play it safe and just stick to Pytorch instead?
Thank you in advance for your help
Regards,
Tejas Garhewal
i have a DELL G5 15 laptop with Geforce GTX 1060 GPU. i installed:
- cuda toolkit 10.1 update2 in windows 10
- cuda toolkit using conda in the active environment
- pip install mxnet-cu101==1.5.0 (as pip refuses to install any version higher than 1.5.0)
in python, i could import mxnet and access the gpu, but i cannot import np and npx.
any help, what is the appropriate installation and versions of cuda and mxnet are compatibel to my system configuration? or how may i import np and npx?
How to fix this error
OSError: libcudnn.so.8: cannot open shared object file: No such file or directory
I ran distributions.ipnyb
I installed mxnet 112
my gpu is nvidia gtx 1650
Reply for more info/
Hey Rachel,
I am in love with this book and would like to contribute towards the solution of exercise.If feasible could you please share the GitHub repository link with me for development for the same?
Thanks,
Al
Hello, I’ve successfully installed mxnet gpu, but I always get an error at the following code:
from d2l import mxnet as d2l
The error is:
ModuleNotFoundError: No module named ‘d2l’
The problem goes away if I write %cd ..
though. Nevertheless, I’m interested in learning what the proper solution for this is.
Thanks in advance!
I can import modules in a Python REPL, but not in jupyter notebooks. To wit:
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-526f864be1f6> in <module>
1 get_ipython().run_line_magic('matplotlib', 'inline')
2 import random
----> 3 from mxnet import np, npx
4 from d2l import mxnet as d2l
5
ModuleNotFoundError: No module named 'mxnet'
Hello,I use ‘pip install’ to install package, but the process crashed when pip start ‘downloading’.
Thank you!
Hello all,
I am running my setup on MacBook with apple’s silicon. It’s GPU does not have CUDA, will I be okay with the the mxnet installation for CPU only?