1

I read the source code of Deep Learning by using Python.(Yusuke Sugomori DBN). I could not understand the meaning of numpy_rng = numpy.random.RandomState(1234). when I type:

>>> import numpy
>>> a = numpy.random.RandomState(1234)
>>> a

it shows <mtrand.RandomState object at 0x100412150>

Is is right? What meaning is this? Any idea , thanks!!

2 Answers 2

2

It creates a numpy.random.RandomState object:

RandomState exposes a number of methods for generating random numbers drawn from a variety of probability distributions.

See numpy.random.RandomState for the class parameters and the complete list of methods.

Sign up to request clarification or add additional context in comments.

Comments

0

You can use like this:

rdm = RandomState(1)
data = rdm.rand(128, 2)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.