mxnet
andeyeluguo
这个作者很懒,什么都没留下…
展开
-
keras的mnist跑起来
mnist数据集相当于学习某个框架的hello,world'''Trains a simple deep NN on the MNIST dataset.Gets to 98.40% test accuracy after 20 epochs(there is *a lot* of margin for parameter tuning).2 seconds per epoch on a K...原创 2018-06-04 11:27:56 · 710 阅读 · 1 评论 -
mxnet系列 安装
caffe一样,编译的时候用make 或者make -8会遇到如下的错误include/mxnet/./base.h:50:2: error: #error "Currently we need g++ 4.8 or higher to fully support c++11 features"需要增加g++的版本到4.8及其以上查看g++版本号g++ --version输原创 2017-04-24 10:57:23 · 408 阅读 · 0 评论 -
mxnet系列3-hello,mxnet
mxnet的helloword程序mxnet提供了定义多维数组的接口>>> import mxnet as mx>>> a = mx.nd.ones((2, 3))>>> b = a * 2 + 1>>> b.asnumpy() # print b by converting to a numpy.ndarray objectarray([[ 3., 3., 3.],原创 2017-04-20 15:47:33 · 801 阅读 · 1 评论 -
mxnet系列之-mshadow
mshadow是一个模板库,支持CPU和GPU目录结构为├── CHANGES.md├── cmake│ ├── Cuda.cmake│ ├── mshadow.cmake│ └── Utils.cmake├── doc│ ├── Doxyfile│ ├── mkdoc.sh│ └── README.md├── guide│ ├── ba原创 2017-04-20 17:32:04 · 821 阅读 · 0 评论 -
mxnet系列 tools 查看params的内容
caffe自己有写查看模型的内容mxnet自己也写了一个import mxnet as mximport pdbdef load_checkpoint(prefix, epoch): """ Load model checkpoint from file. :param prefix: Prefix of model name. :param epoch原创 2017-04-24 13:19:32 · 3082 阅读 · 3 评论 -
mxnet系列教程之1-第一个例子
第一个例子当然是mnist的例子假设已经成功安装了mxnet例子的代码如下:cd mxnet/example/image-classificationpython train_mnist.py这样就会运行下去原创 2017-04-19 15:52:41 · 7016 阅读 · 2 评论 -
mxnet系列 全连接层代码阅读
全连接操作(全连接层)也具有前向和反向。代码 解析如下 virtual void Forward(const OpContext &ctx, const std::vector &in_data, const std::vector &req, const原创 2017-04-21 17:31:50 · 1218 阅读 · 0 评论 -
mxnet系列教程 代码阅读2-conv层的代码阅读
caffe里面都是以layer的形式表现运算,mxnet中直接用operator来进行描述了具体的代码在src/operator中,下面将进行三个模块的解读convolution-inl.hconvolution.ccconvolution.cu//1.基本信息/*! * Copyright (c) 2015 by Contributors * \fil原创 2017-04-21 16:35:20 · 2928 阅读 · 0 评论 -
mxnet系列之 代码阅读1
在文献[1]中写了怎样读mxnet的源代码。所有的模块接口的定义都在include/mxnet中,意思就是这个include里面的代码就是好的document以base.h为例进行分析#ifndef MXNET_BASE_H_#define MXNET_BASE_H_#include #include #include #include #include // nnvm原创 2017-04-21 15:41:46 · 1565 阅读 · 0 评论 -
mxnet系列之 c++11
在文章[1]中展示了c++11的最新特性,经过了13年的时间,c++11比c++98更改了一些新的特性,相当于一门新的语言。1吸收了当前其他流行语言的一些特性。1.1 比如可以使用auto来不指定变量类型,和python、matlab相似。auto x=0; //x has type int because 0 is intauto c='a'; //charauto d=0.5;原创 2017-04-21 15:30:53 · 2194 阅读 · 0 评论 -
mxnet系列之 增加新的层
增加新的层也是常见的深度学习操作[1] 帅到被拉格朗日原创 2017-04-20 18:48:19 · 1792 阅读 · 0 评论 -
mxnet系列之 自定义目标函数
自定义损失函数是深度学习常用的操作,mxnet可以通过python代码自定义目标函数[1] mxnet自定义目标函数原创 2017-04-20 18:46:28 · 1272 阅读 · 0 评论 -
mxnet系列教程2-cifar例子
mnist例子之后就是cifar例子和mnist一样运行python train_cifar10.py即可运行程序。第一次运行将自动下载数据。原创 2017-04-20 18:34:27 · 758 阅读 · 0 评论 -
mxnet系列之mxnet介绍
mxnet是[1] mxnet的前世今生原创 2017-04-20 17:43:55 · 1220 阅读 · 0 评论 -
mxnet第二个例子-neural-style
风格转换也是比较有意思的一个例子在目录examples/neural-style文件中有相应的文件首先run download.sh 进行下载相应的文件#!/bin/bashmkdir -p modelcd modelwget https://github.com/dmlc/web-data/raw/master/mxnet/neural-style/model/vgg19原创 2017-04-19 16:27:40 · 777 阅读 · 0 评论