In section Operations, it seems that the function f should be R^2 \to R rather than R \to R.
And in “In ”, the operations should be between x+y, x-y, etc. (it says x+x, x-x,…).
I get the following error when running x = nd.array(12). I installed mxnet as per the introduction and activated the conda environment. Please advise:
AttributeError: module ‘mxnet.ndarray’ has no attribute ‘arrange’
Disregard, I was using nd.arrange() and the command is nd.arange() with one ‘r’.
Thanks. Would you like to contribute to the book by fixing such issues?
I have followed all installation steps. I tried running the code in the Notebook by going to the folder “d2l-en”, then type “cmd” onto the address bar. When the command prompt window pops up I typed in “jupyter notebook”. The note books then appear and I open the notebook for this section. When I tried to run the code, the following error appears. Can someone help? Thanks
ModuleNotFoundError Traceback (most recent call last)
----> 1 import mxnet as mx
2 from mxnet import nd
ModuleNotFoundError: No module named ‘mxnet’
Have you install mxnet? Use “pip install mxnet”
Or “pip install mxnet-cuxx” replace xx with your cuda version and multiply by 10, ex- “pip install mxnet-cu100” for cuda version 10.0
It worked! Thanks for the fix
Hi there, I am stuck (yet again) on the Data Manipulation part (section 2.1).
I opened up a bank Jupyter Notebook to practice the code in the book. When I tried to import mxnet as mx and from mxnet import nd, I get the following message. Does any know what that means and how to fix it? Thanks
C:\ProgramData\Anaconda3\lib\site-packages\h5py_hl\base.py:19: DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ is deprecated, and in 3.8 it will stop working from collections import (Mapping, MutableMapping, KeysView, C:\ProgramData\Anaconda3\lib\site-packages\sklearn\externals\joblib\func_inspect.py:53: DeprecationWarning: invalid escape sequence < ‘<doctest (..rst)[(.)]>’, source_file).groups() C:\ProgramData\Anaconda3\lib\site-packages\sklearn\externals\joblib_memory_helpers.py:10: DeprecationWarning: invalid escape sequence \s cookie_re = re.compile(“coding[:=]\s*([-\w.]+)”) C:\ProgramData\Anaconda3\lib\site-packages\socks.py:58: DeprecationWarning: Using or importing the ABCs from ‘collections’ instead of from ‘collections.abc’ is deprecated, and in 3.8 it will stop working from collections import Callable
Sorry I don’t know how to fix this. But I think mxnet installation is perfectly fine. It’s the anaconda that causing the error. Try removing anaconda if possible. And then uninstall and reinstall mxnet.
Is there any rule for broadcast mechanism, because I am unable to broadcast with tensors for Exercise - 2
This is what I have tried for tensors:
a = nd.random.normal(0, 1, shape=(1, 6, 2)) b = nd.random.normal(0, 1, shape=(6, 3, 1))
To broadcast you need to have dimensions of size 1, or matching dimensions across your tensors
a = nd.random.normal(0, 1, shape=(1, 6, 2)) b = nd.random.normal(0, 1, shape=(6, 6, 1))
I get it now thanks