A type error is thrown when using '/' to calculate matrix sizes. Explicitly using the integer division operator ('//') seems to fix it. Very weird since N is being declared as an integer in the step before it.
Traceback (most recent call last): File "/home/ninja/Documents/github/dlwithtf/ch3/logistic_regression_tf.py", line 13, in <module> mean=np.array((-1, -1)), cov=.1*np.eye(2), size=(N/2,)) File "mtrand.pyx", line 4508, in mtrand.RandomState.multivariate_normal File "mtrand.pyx", line 1550, in mtrand.RandomState.standard_normal File "mtrand.pyx", line 167, in mtrand.cont0_array TypeError: 'float' object cannot be interpreted as an integer
A type error is thrown when using '/' to calculate matrix sizes. Explicitly using the integer division operator ('//') seems to fix it. Very weird since N is being declared as an integer in the step before it.
Traceback (most recent call last): File "/home/ninja/Documents/github/dlwithtf/ch3/logistic_regression_tf.py", line 13, in <module> mean=np.array((-1, -1)), cov=.1*np.eye(2), size=(N/2,)) File "mtrand.pyx", line 4508, in mtrand.RandomState.multivariate_normal File "mtrand.pyx", line 1550, in mtrand.RandomState.standard_normal File "mtrand.pyx", line 167, in mtrand.cont0_array TypeError: 'float' object cannot be interpreted as an integer