MXNet

mxnet gradient descent for linear regression, variable types error

只谈情不闲聊 提交于 2019-12-02 08:29:39
I'm trying to implement a simple gradient descent for linear regression. It works normally if I compute the gradient manually (by using the analytical expression), but now i was trying to implement it with autograd from the mxnet module. This is the code from mxnet import autograd, np, npx npx.set_np() def main(): # learning algorithm parameters nr_epochs = 1000 alpha = 0.01 # read data, insert column of ones (to include bias with other parameters) data = pd.read_csv("dataset.txt", header=0, index_col=None, sep="\s+") data.insert(0, "x_0", 1, True) # insert column of "1"s as x_0 m = data.shape

记录下mxnet分布式

ε祈祈猫儿з 提交于 2019-11-30 12:29:25
python launch.py -n 2 -H host --launcher ssh which python ../example/image-classification/train_mnist.py 用上面的命令后,发现在两台主机并不是分布式,只是两台机器分别运行啦一次,做啦相同的操作 来源: https://my.oschina.net/u/2511906/blog/3110935

安装mxnet出现的错误

白昼怎懂夜的黑 提交于 2019-11-30 03:31:51
我出现下面的错误:是因为我前面的安装步骤都正确,只是这一步出现错误,sudo python setup.py install 其实我看了下我默认的python是3.6,是大于3.5 ,改为sudo python3 setup.py install就可以啦 来源: https://my.oschina.net/u/2511906/blog/3108194