Author: jinyang
Date: Wed Sep 2 10:31:23 2015
New Revision: 1700761
URL: http://svn.apache.org/r1700761
Log:
move to apache site: edit the link
Modified:
incubator/singa/site/trunk/content/markdown/docs/data.md
Modified: incubator/singa/site/trunk/content/markdown/docs/data.md
URL:
http://svn.apache.org/viewvc/incubator/singa/site/trunk/content/markdown/docs/data.md?rev=1700761&r1=1700760&r2=1700761&view=diff
==============================================================================
--- incubator/singa/site/trunk/content/markdown/docs/data.md (original)
+++ incubator/singa/site/trunk/content/markdown/docs/data.md Wed Sep 2
10:31:23 2015
@@ -73,7 +73,6 @@ fields, which are different from the abo
}
{% endcomment %}
-
### DataShard creation
Users write code to convert their data into `Record`s and insert them into
shards
@@ -114,6 +113,7 @@ following the subsequent steps.
g++ create_shard.cc user.pb.cc -std=c++11 -lsinga \
-ISINGA_ROOT/include -LSINGA_ROOT/.libs/
-Wl,-unresolved-symbols=ignore-in-shared-libs \
+
-Wl,-rpath=SINGA_ROOT/.libs/ -o create_shard.bin
@@ -122,6 +122,7 @@ following the subsequent steps.
./create_shard.bin <args>
+
### Example - CIFAR dataset
This example uses the [CIFAR-10 image
dataset](http://www.cs.toronto.edu/~kriz/cifar.html) collected by Alex
Krizhevsky.
@@ -181,7 +182,7 @@ to convert images in the binary files in
In addition, it computes average values (not shown here) of image pixels
as another `Record`
which is directly serialized into *SINGA_ROOT/USER_DATA/image_mean.bin*.
The mean values will be used for preprocessing image features.
- {% comment %}
+
for (int itemid = 0; itemid < kCIFARBatchSize; ++itemid) {
const string& pixels = image->pixel();
for(int i=0; i<kCIFARImageNBytes; i++)
@@ -190,7 +191,6 @@ to convert images in the binary files in
}
for(int i=0; i<kCIFARImageNBytes; i++)
mean.set_data(i, mean.data(i)/count);
- {% endcomment %}
4. Compile and run the program. SINGA provides an example Makefile that
contains instructions
for compiling the source code and linking it with *libsinga.so*. Users
just execute the following command.
@@ -219,6 +219,7 @@ Data shards will be generated into *mnis
$ make create
+
## LMDB
To be filled soon.