Open Ishitori opened 5 years ago
Hey, this is the MXNet Label Bot. Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it. Here are my recommended labels: Bug
I tried it 6 times and looks like it ain't that bad But certainly need to delve deeper I guess
>>> from mxnet import nd
/Users/chaitanyabapat/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
>>>
>>> data = nd.array([0.5, 0.5])
>>>
>>> for k in range(3):
... a = nd.random.multinomial(data, shape=(5, 1))
... print(a)
...
[[1]
[1]
[1]
[1]
[1]]
<NDArray 5x1 @cpu(0)>
[[1]
[1]
[1]
[0]
[1]]
<NDArray 5x1 @cpu(0)>
[[1]
[0]
[0]
[0]
[1]]
<NDArray 5x1 @cpu(0)>
>>> for k in range(3):
... a = nd.random.multinomial(data, shape=(5, 1))
... print(a)
...
[[0]
[1]
[0]
[0]
[0]]
<NDArray 5x1 @cpu(0)>
[[1]
[1]
[1]
[0]
[1]]
<NDArray 5x1 @cpu(0)>
[[0]
[1]
[1]
[0]
[0]]
<NDArray 5x1 @cpu(0)>
Description
If I try to sample from multinominal distribution running the same script multiple times, and not setting the seed, I always get the same result. If I use numpy for similar case, I receive different results for every run.
Created based on this question.
Environment info (Required)
Package used (Python/R/Scala/Julia): Python
MXNet commit hash: nighly build
Minimum reproducible example
Steps to reproduce
What have you tried to solve it?
I tried to see if it is really a problem and wrote numpy example. And if I run the example below it returns me different results every time I run it.