[GitHub] regzhuce commented on issue #7375: Can I set instance weight when training?

2017-08-07 Thread git
regzhuce commented on issue #7375: Can I set instance weight when training?
URL: 
https://github.com/apache/incubator-mxnet/issues/7375#issuecomment-320857766
 
 
   It's so strange when predicting, I have to feed a constant weight to the 
model, and get a loss value but the prediction value.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joey2014 commented on issue #7368: Caffe converter test fails, causing CI to halt for all PRs

2017-08-07 Thread git
joey2014 commented on issue #7368: Caffe converter test fails, causing CI to 
halt for all PRs
URL: 
https://github.com/apache/incubator-mxnet/issues/7368#issuecomment-320829996
 
 
   vgg-16 model converting issue is caused by 
\ -model = mx.mod.Module(symbol=sym, label_names=['prob_label', ])
\+model = mx.mod.Module(symbol=sym, label_names=[arg_names[-1], ])
   the reason for this issue:
 in vgg-16,  arg_names[-1]  is conv5_3_bias not the expect name 
prob_label , after revert this change, vgg-16-.params keeps same in binary 
comparing with the previous converting result.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mli commented on issue #7367: Code freeze - halt code merges

2017-08-07 Thread git
mli commented on issue #7367: Code freeze - halt code merges
URL: 
https://github.com/apache/incubator-mxnet/issues/7367#issuecomment-320853676
 
 
   #7379
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] mli opened a new pull request #7379: Add license header

2017-08-07 Thread git
mli opened a new pull request #7379: Add license header
URL: https://github.com/apache/incubator-mxnet/pull/7379
 
 
   Added ASF license header to all files except for 
   - submodules
   - R-package (not apache2)
   - src/operator/mkl/ (licensed to intel)
   - src/operator/contrib/ctc_include/ (licensed to nvidia)
   
   Also add a CI job to test if new added files have a proper header
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] lx75249 commented on issue #6420: Fix symbol load json

2017-08-07 Thread git
lx75249 commented on issue #6420: Fix symbol load json
URL: https://github.com/apache/incubator-mxnet/pull/6420#issuecomment-320848358
 
 
   @piiswrong Yes, this patch solves that bug.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on a change in pull request #7226: Extending the GPU dot operator

2017-08-07 Thread git
eric-haibin-lin commented on a change in pull request #7226: Extending the GPU 
dot operator
URL: https://github.com/apache/incubator-mxnet/pull/7226#discussion_r131818493
 
 

 ##
 File path: src/operator/tensor/dot-inl.cuh
 ##
 @@ -353,27 +640,308 @@ inline void DotCsrDnsDnsImpl(mshadow::Stream* s,
 }
 
 /*!
- * \brief Impl of dot(csr.T, dns) = rsp
+ * \brief GPU Impl of dot(csr, dns) = rsp and dot(csr.T, dns) = rsp
  */
-inline void DotCsrDnsRspImpl(mshadow::Stream* s,
+inline void DotCsrDnsRspImpl(const OpContext& ctx,
+ const gpu& gpu_dev,
  const NDArray& lhs,
  const TBlob& rhs,
  const OpReqType req,
  const bool trans_lhs,
  NDArray* ret) {
-  LOG(FATAL) << "DotCsrDnsRspImpl gpu version is not implemented.";
+  if (kNullOp == req) return;
+  CHECK_EQ(lhs.storage_type(), kCSRStorage);
+  CHECK_EQ(ret->storage_type(), kRowSparseStorage);
+  if (!lhs.storage_initialized()) return;
+
+  using mshadow::Shape1;
+  using mxnet_op::Kernel;
+  using mxnet_op::set_zero;
+  using nnvm::dim_t;
+  mshadow::Stream* s = ctx.get_stream();
+
+  const TBlob data_l = lhs.data();
+  const TBlob indptr_l = lhs.aux_data(csr::kIndPtr);
+  const TBlob col_idx_l = lhs.aux_data(csr::kIdx);
+  const TBlob& data_r = rhs;
+
+  const dim_t num_rows_l = lhs.shape()[0];
+  const dim_t num_cols_l = lhs.shape()[1];
+  const dim_t num_cols_r = rhs.shape_[1];
+  const dim_t threads_per_warp = mxnet_op::cuda_get_device_prop().warpSize;
+  dim_t num_threads;
+  // TODO: remove kernel dependency on warpSize=32
+  if (threads_per_warp != 32) {
+LOG(FATAL) << "DotCsrDnsRspImpl GPU kernels expect warpSize=32";
+  }
+
+  MSHADOW_SGL_DBL_TYPE_SWITCH(data_l.type_flag_, DType, {  // data type
+MSHADOW_IDX_TYPE_SWITCH(indptr_l.type_flag_, IType, {  // indptr type
+  MSHADOW_IDX_TYPE_SWITCH(col_idx_l.type_flag_, CType, {  // col idx type
+if (trans_lhs) {
+  // Compute number of non-zero rows (nnr) of output matrix
+  // - alloc temp storage for row_flg array and for cub's prefix sum
+  // - mark non-zero columns of csr matrix in row_flg
+  // - compute inclusive prefix sum over marked array
+  // - copy last value (nnr_out) from device to host
+  dim_t* row_flg_out = NULL;
+  void* d_temp_storage = NULL;
+  size_t temp_storage_bytes = 0;
+  cub::DeviceScan::InclusiveSum(d_temp_storage,
+temp_storage_bytes,
+row_flg_out,
+row_flg_out,
+num_cols_l,
+mshadow::Stream::GetStream(s));
+  mshadow::Tensor workspace = ctx.requested[0]
+  .get_space_typed(Shape1(num_cols_l*sizeof(dim_t)+temp_storage_bytes), s);
+  row_flg_out = reinterpret_cast(workspace.dptr_);
+  d_temp_storage = workspace.dptr_ + num_cols_l*sizeof(dim_t);
+  num_threads = num_cols_l;
+  Kernel::Launch(s, num_threads, row_flg_out);
+  num_threads = num_rows_l * threads_per_warp;
+  Kernel::Launch(s, num_threads,
+  row_flg_out, col_idx_l.dptr(), indptr_l.dptr(),
+  num_rows_l, num_cols_l);
+  cub::DeviceScan::InclusiveSum(d_temp_storage,
+temp_storage_bytes,
+row_flg_out,
+row_flg_out,
+num_cols_l,
+mshadow::Stream::GetStream(s));
+  dim_t nnr_out = 0;
+  CUDA_CALL(cudaMemcpy(_out, _flg_out[num_cols_l-1], 
sizeof(dim_t),
+   cudaMemcpyDeviceToHost));
+
+  // Allocate output matrix space
+  ret->CheckAndAlloc({Shape1(nnr_out)});
+  const TBlob data_out_blob = ret->data();
+  const TBlob row_idx_out_blob = ret->aux_data(rowsparse::kIdx);
+  MSHADOW_IDX_TYPE_SWITCH(row_idx_out_blob.type_flag_, RType, {  // 
row idx type
+DType* data_out = data_out_blob.dptr();
+RType* row_idx_out = row_idx_out_blob.dptr();
+if (kWriteTo == req) {
+  num_threads = nnr_out * num_cols_r;
+  Kernel::Launch(s, num_threads, data_out);
+}
+num_threads = nnr_out;
+Kernel::Launch(s, num_threads, row_idx_out);
+
+// Fill row_idx array of output matrix, using the row_flg values
+num_threads = num_cols_l;
+Kernel::Launch(s, num_threads,
+row_idx_out, row_flg_out, num_cols_l);
+
+   

[GitHub] eric-haibin-lin commented on a change in pull request #7226: Extending the GPU dot operator

2017-08-07 Thread git
eric-haibin-lin commented on a change in pull request #7226: Extending the GPU 
dot operator
URL: https://github.com/apache/incubator-mxnet/pull/7226#discussion_r131818612
 
 

 ##
 File path: src/operator/tensor/dot-inl.h
 ##
 @@ -187,8 +187,8 @@ inline bool DotForwardInferStorageType(const 
nnvm::NodeAttrs& attrs,
   CHECK_EQ(out_attrs->size(), 1U);
   const DotParam& param = nnvm::get(attrs.parsed);
   // csr has many zero columns, so the result of dot(csr.T, matrix) should be 
rsp
-  // dot(csr.T,dns)=rsp not yet implemented on gpu
-  if (param.transpose_a && kCSRStorage == (*in_attrs)[0] && ctx.dev_type != 
Context::kGPU) {
+  // TODO(stefan/haibin): don't enforce kRowSparseStorage if out_attrs has 
already been set
+  if (param.transpose_a && kCSRStorage == (*in_attrs)[0]) {
 STORAGE_TYPE_ASSIGN_CHECK(*out_attrs, 0, kRowSparseStorage);
 
 Review comment:
use `type_assign()` instead of check?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on a change in pull request #7226: Extending the GPU dot operator

2017-08-07 Thread git
eric-haibin-lin commented on a change in pull request #7226: Extending the GPU 
dot operator
URL: https://github.com/apache/incubator-mxnet/pull/7226#discussion_r131816817
 
 

 ##
 File path: src/operator/tensor/dot-inl.cuh
 ##
 @@ -9,66 +9,163 @@
 #include 
 #include 
 
+#include 
+
 namespace mxnet {
 namespace op {
-using mshadow::cuda::kBaseThreadNum;
 
 /*!
- * \brief Scalar kernel of dot(csr, dns1) = dns2
+ * \brief GPU auxiliary kernel to flag non-zero rows of an rsp matrix with 
indices.
+ * Parallelized by matrix rows: 1 thread/row
+ */
+struct SetRspRowFlgKernel {
+  /*!
+   * \brief
+   * \param tid  global thread id
+   * \param row_flg  array to flag storage indices of non-zero rows
+   * \param row_idx  rsp matrix row index array storing indices of non-zero 
rows
+   * \param nnr  rsp matrix number of non-zero rows (storage shape)
+   */
+  template
+  __device__ __forceinline__ static void Map(int tid,
+ RType* row_flg,
+ const RType* row_idx,
+ const nnvm::dim_t nnr) {
+if (tid < nnr) {
+  row_flg[row_idx[tid]] = tid+1;
+}
+  }
+};
+
+/*!
+ * \brief GPU auxiliary kernel for marking non-zero columns of a csr matrix.
+ * Parallelized by matrix rows: 1 warp/row
+ */
+struct MarkCsrZeroColsWarpKernel {
+  /*!
+   * \brief
+   * \param tid   global thread id
+   * \param col_idx   csr matrix column indices
+   * \param indptrcsr matrix row index pointer
+   * \param num_rows  csr matrix number of rows
+   * \param num_cols  csr matrix number of columns
+   */
+  template
+  __device__ __forceinline__ static void Map(int tid,
+ nnvm::dim_t* flg,
+ const CType* col_idx,
+ const IType* indptr,
+ const nnvm::dim_t num_rows,
+ const nnvm::dim_t num_cols) {
+typedef unsigned long long int uint64_cu;
+static_assert(sizeof(uint64_cu) == sizeof(nnvm::dim_t), "unexpected sizeof 
dim_t");
+
+const nnvm::dim_t warp_id = tid / 32;  // global warp   id
+const nnvm::dim_t lane= tid & (32-1);  // local  thread id within warp
+
+if (warp_id < num_rows) {
+  uint64_cu zero = 0;
+  uint64_cu one = 1;
+  for (IType j = indptr[warp_id]+lane; j < indptr[warp_id+1]; j+=32) {
 
 Review comment:
   I'm curious what's the performance implication if you simply let all threads 
race to write to flg[col_idx[j]]? How much would write conflicts/cache 
coherence protocol slow things down? 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] tornadomeet commented on issue #7374: fix consistency of cpu/gpu in stn

2017-08-07 Thread git
tornadomeet commented on issue #7374: fix consistency of cpu/gpu in stn
URL: https://github.com/apache/incubator-mxnet/pull/7374#issuecomment-320846282
 
 
   ok, i'll add it today or tomorrow.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] yash1 opened a new pull request #7378: Docs for GAN

2017-08-07 Thread git
yash1 opened a new pull request #7378: Docs for GAN
URL: https://github.com/apache/incubator-mxnet/pull/7378
 
 
   Based on the notebook I made here: 
https://github.com/dmlc/mxnet-notebooks/pull/59
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rahul003 commented on issue #7321: fixes broken compilation by including tensor_blob

2017-08-07 Thread git
rahul003 commented on issue #7321: fixes broken compilation by including 
tensor_blob
URL: https://github.com/apache/incubator-mxnet/pull/7321#issuecomment-320741353
 
 
   @piiswrong So what needs to be done to ensure mxnet compiles fine?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rahul003 commented on a change in pull request #7321: fixes broken compilation by including tensor_blob

2017-08-07 Thread git
rahul003 commented on a change in pull request #7321: fixes broken compilation 
by including tensor_blob
URL: https://github.com/apache/incubator-mxnet/pull/7321#discussion_r131816230
 
 

 ##
 File path: src/io/inst_vector.h
 ##
 @@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 Review comment:
   I see. Okay, I'll test that and update the PR
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] reminisce commented on a change in pull request #7321: fixes broken compilation by including tensor_blob

2017-08-07 Thread git
reminisce commented on a change in pull request #7321: fixes broken compilation 
by including tensor_blob
URL: https://github.com/apache/incubator-mxnet/pull/7321#discussion_r131816017
 
 

 ##
 File path: src/io/inst_vector.h
 ##
 @@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 Review comment:
   I think you need to change this to `#include `.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jeremiedb commented on issue #7375: Can I set instance weight when training?

2017-08-07 Thread git
jeremiedb commented on issue #7375: Can I set instance weight when training?
URL: 
https://github.com/apache/incubator-mxnet/issues/7375#issuecomment-320843077
 
 
   The strategy I've used is to build a custom loss function using the MakeLoss 
operator and feeding it with the weights, For example: 
   loss = MakeLoss(weight * mx.symbol.square(label-pred))
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zhanghang1989 opened a new issue #7377: gluon.nn.Conv2D initialization int stride not handled correctly

2017-08-07 Thread git
zhanghang1989 opened a new issue #7377: gluon.nn.Conv2D initialization int 
stride not handled correctly
URL: https://github.com/apache/incubator-mxnet/issues/7377
 
 
   When creating 'gluon.nn.Conv2D', passing the stride with integer value, it 
does not automatically convert to tuple and cause 'Floating Point Exception'.
   
for example 
   ```
   nn.Conv2D(in_channels=inplanes, 
  channels=planes * self.expansion,
  kernel_size=1, stride=1)
   ```
   will cause error when forwarding.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Lyken17 opened a new issue #7376: MXbox -- a simple and flexible vision toolbox for mxnet framework.

2017-08-07 Thread git
Lyken17 opened a new issue #7376: MXbox -- a simple and flexible vision toolbox 
for mxnet framework.
URL: https://github.com/apache/incubator-mxnet/issues/7376
 
 
   Thanks for DMLC generous sharing, we can use mxnet -- a great framework 
efficient  in both memory and speed. However, after using mxnet for months, I 
found mxnet still has some inconvenience in developing.
   
   For example, mxnet recommends using `im2rec` for loading dataset, but 
sometimes we need to handle a dataset where new data comes every day. Then 
generating `im2rec` becomes a time consuming job since incremental adding is 
not supported. Also, `rec` seems to originally designed for classification 
tasks, when handling other tasks like semantic segmentation and nlp machine 
translation, designing a correct `rec` with proper argumentations can be 
difficult. So I hope there to be a simple and efficient data loader for various 
tasks.
   
   Another thing is pretrained models. No matter you are a researcher or 
engineer, a good baseline is always a good start. Unfortunately, many 
state-of-art models are not originally implemented in mxnet. And their 
definition files and pretrained weights are scatted among sites. Let alone 
sometimes they do not provide a detailed description of the important 
parameters such as normalization mean and std. It would be great if there is a 
model zoo providing popular networks together with their pretrained weights and 
hyper parameters. 
   
   Inspired by [pytorch](https://github.com/pytorch/pytorch) and 
[torchvision](https://github.com/pytorch/vision),  which give a great 
flexibility to developing, I write [mxbox](https://github.com/Lyken17/mxbox), 
-- a simple and flexible vision toolbox for mxnet framework. You can download 
it by 
   ```bash
   pip install mxbox
   ```
   
   Now [mxbox](https://github.com/Lyken17/mxbox) provides following features
   
   1. Define **preprocess** as a flow (several backends are supported, so no 
longer to worry about opencv2 / 3 compatibility)
   
   ```python
   transform = transforms.Compose([
   transforms.RandomSizedCrop(224),
   transforms.RandomHorizontalFlip(),
   transforms.mx.ToNdArray(),
   transforms.mx.Normalize(mean = [123.68,116.779,103.939 ]),
   ])
   ```
   
   2) Build an efficient multi-thread **DataLoader** in few lines
   
   Common datasets such as `cifar10`, `cifar100`, `SVHN`, `MNIST` are 
out-of-the-box. You can simply load them from `mxbox.datasets`.
   
   ```python
   from mxbox import transforms, datasets, DataLoader
   trans = transforms.Compose([
   transforms.mx.ToNdArray(), 
   transforms.mx.Normalize(mean = [ 0.485, 0.456, 0.406 ],
   std  = [ 0.229, 0.224, 0.225 ]),
   ])
   dataset = datasets.CIFAR10('~/.mxbox/cifar10', transform=trans, 
download=True)
   
   batch_size = 32
   feedin_shapes = {
   'batch_size': batch_size,
   'data': [mx.io.DataDesc(name='data', shape=(batch_size, 3, 32, 32), 
layout='NCHW')],
   'label': [mx.io.DataDesc(name='softmax_label', shape=(batch_size, ), 
layout='N')]
   }
   loader = DataLoader(dataset, feedin_shapes, threads=8, shuffle=True)
   ```  
   3) Load popular model with pretrained weights
   ```python
   alexnet = mxbox.models.alexnet(num_classes=1000, pretrained=True)
   vgg16 = mxbox.models.vgg16(num_classes=1000, pretrained=True)
   resnet_diy = mxbox.models.resnet(num_classes=1000, num_units=[6,14,32,64], 
pretrained=True)
   densenet169 = mxbox.models.densenet169(num_classes=1000, pretrained=True)
   ```
   
   Now most parts have finished construction except `models`. Models provided 
in [mxnet model zoo](https://github.com/dmlc/mxnet-model-gallery) do not come 
with definition files. And recent popular models like 
[resnet](https://arxiv.org/abs/1512.03385) and 
[densenet](https://github.com/liuzhuang13/DenseNet) are not included. I would 
appreciate if someone can help on this.
   
   Any questions, comments or suggestions are welcome!
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] regzhuce opened a new issue #7375: Can I set instance weight when training?

2017-08-07 Thread git
regzhuce opened a new issue #7375: Can I set instance weight when training?
URL: https://github.com/apache/incubator-mxnet/issues/7375
 
 
   Is there any way that I can set a weight for every instance when I train the 
model?
   I just cannot find any doc about this.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] thirdwing closed issue #7019: R Character RNN program question

2017-08-07 Thread git
thirdwing closed issue #7019: R Character RNN program question
URL: https://github.com/apache/incubator-mxnet/issues/7019
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Update custom.cc (#7373)

2017-08-07 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new ada6d4e  Update custom.cc (#7373)
ada6d4e is described below

commit ada6d4e0bbfb6a244a868c8ef6edf40529dd996d
Author: Eric Junyuan Xie 
AuthorDate: Mon Aug 7 19:41:25 2017 -0700

Update custom.cc (#7373)
---
 src/operator/custom/custom.cc | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/operator/custom/custom.cc b/src/operator/custom/custom.cc
index ee42063..5a40be9 100644
--- a/src/operator/custom/custom.cc
+++ b/src/operator/custom/custom.cc
@@ -268,13 +268,13 @@ void Forward(const OpStatePtr& state,
 tags.push_back(4);
   }
 
-  bool old = autograd::AutogradRuntime::Get()->SetIsTraining(false);
+  bool old = autograd::AutogradRuntime::Get()->SetIsRecording(false);
 
   
CHECK(reinterpret_cast(params.info->callbacks[kCustomOpForward])(
 ptrs.size(), ptrs.data(), tags.data(), reinterpret_cast(req.data()),
 static_cast(ctx.is_train), params.info->contexts[kCustomOpForward]));
 
-  autograd::AutogradRuntime::Get()->SetIsTraining(old);
+  autograd::AutogradRuntime::Get()->SetIsRecording(old);
 }
 
 
@@ -312,13 +312,13 @@ void Backward(const OpStatePtr& state,
 tags.push_back(4);
   }
 
-  bool old = autograd::AutogradRuntime::Get()->SetIsTraining(false);
+  bool old = autograd::AutogradRuntime::Get()->SetIsRecording(false);
 
   
CHECK(reinterpret_cast(params.info->callbacks[kCustomOpBackward])(
-ptrs.size(), ptrs.data(), tags.data(), reinterpret_cast(req.data()), 1,
-params.info->contexts[kCustomOpBackward]));
+ptrs.size(), ptrs.data(), tags.data(), reinterpret_cast(req.data()),
+static_cast(ctx.is_train), params.info->contexts[kCustomOpBackward]));
 
-  autograd::AutogradRuntime::Get()->SetIsTraining(old);
+  autograd::AutogradRuntime::Get()->SetIsRecording(old);
 }
 
 

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] piiswrong closed pull request #7373: Update custom.cc

2017-08-07 Thread git
piiswrong closed pull request #7373: Update custom.cc
URL: https://github.com/apache/incubator-mxnet/pull/7373
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on issue #7374: fix consistency of cpu/gpu in stn

2017-08-07 Thread git
piiswrong commented on issue #7374: fix consistency of cpu/gpu in stn
URL: https://github.com/apache/incubator-mxnet/pull/7374#issuecomment-320834185
 
 
   why wasn't this captured by test? Could you add a consistency test?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] joey2014 commented on issue #7368: Caffe converter test fails, causing CI to halt for all PRs

2017-08-07 Thread git
joey2014 commented on issue #7368: Caffe converter test fails, causing CI to 
halt for all PRs
URL: 
https://github.com/apache/incubator-mxnet/issues/7368#issuecomment-320829996
 
 
   vgg-16 model converting issue is caused by 
\ -model = mx.mod.Module(symbol=sym, label_names=['prob_label', ])
\+model = mx.mod.Module(symbol=sym, label_names=[arg_names[-1], ])
   the reason for this issue:
 in vgg-16,  arg_names[-1]  is conv5_3_bias not the expect name 
prob_label , after revert this change, vgg-16-.params keeps same in binary 
comparing with the previous converting result.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Lyken17 closed issue #7355: [API missing] mx.nd.stack & mx.sym.stack

2017-08-07 Thread git
Lyken17 closed issue #7355: [API missing] mx.nd.stack & mx.sym.stack
URL: https://github.com/apache/incubator-mxnet/issues/7355
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] Lyken17 commented on issue #7355: [API missing] mx.nd.stack & mx.sym.stack

2017-08-07 Thread git
Lyken17 commented on issue #7355: [API missing] mx.nd.stack & mx.sym.stack
URL: 
https://github.com/apache/incubator-mxnet/issues/7355#issuecomment-320830055
 
 
   Solved. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on issue #7341: Usage of Tensorboard in Distributed MXNet

2017-08-07 Thread git
zihaolucky commented on issue #7341: Usage of Tensorboard in Distributed MXNet
URL: 
https://github.com/apache/incubator-mxnet/issues/7341#issuecomment-320829394
 
 
   @LakeCarrot There're some discussions on this issue, 
https://stackoverflow.com/questions/40830085/tensorboard-can-not-read-summaries-on-google-cloud-storage.
 As far as I know, I haven't seen this feature in origin TensorBoard, and our 
standalone version only supports reading from local. This feature has been 
raised in https://github.com/dmlc/tensorboard/issues/39, I'll follow this issue 
and update the status.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jeremiedb commented on issue #7349: time series delay output mxnet

2017-08-07 Thread git
jeremiedb commented on issue #7349: time series delay output mxnet
URL: 
https://github.com/apache/incubator-mxnet/issues/7349#issuecomment-320822751
 
 
   If I understand well, your need is similar to a one-to-one RNN structure in 
which the first 50 outputs are ignored. 
   
   If you're not already using it, I think it would be worth looking at the 
`mx.symbol.RNN` which provides a convenient abstraction for working with of 
recurrent structure. In short, it takes as input a data of dims batch_size x 
sequence_length and its output is of dims hidden_features x batch_size x 
sequence_length. For your need, you could slice that output to remove the first 
50 elements of the sequence_length dimension and then proceed to the decoding 
and application of the output layer as usual. 
   
   Not sure if the model might crash because some elements of the RNN outputs 
end nowhere because of the slicing. If it's the case, it could do a dummy trick 
such as multiplying by 0 these first 50 outputs and merge back to the rest for 
decoding. 
   
   I don't have code that do exactly that, but I'm currently looking to bring 
that RNN structure into the general R API, you can take a look at the WIP here 
so see how to deal with `mx.symbol.RNN`: 
https://github.com/jeremiedb/mxnet_R_bucketing/blob/master/blog/Blog_LSTM_NLP_Classification.Rmd
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7362: import mxnet errors

2017-08-07 Thread git
szha commented on issue #7362: import mxnet errors
URL: 
https://github.com/apache/incubator-mxnet/issues/7362#issuecomment-320820795
 
 
   pip 1.5.4 is too old, so you might have got a wrong version of mxnet.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on a change in pull request #7226: Extending the GPU dot operator

2017-08-07 Thread git
eric-haibin-lin commented on a change in pull request #7226: Extending the GPU 
dot operator
URL: https://github.com/apache/incubator-mxnet/pull/7226#discussion_r131786617
 
 

 ##
 File path: benchmark/python/dot.py
 ##
 @@ -0,0 +1,265 @@
+import ctypes
+
+from mxnet.test_utils import *
+import scipy.sparse as sp
+import os
+import time
+import argparse
+
+from mxnet.base import check_call, _LIB
+from util import get_data, estimate_density
+
+parser = argparse.ArgumentParser(description="Benchmark sparse operators",
+ 
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+parser.add_argument('--num-omp-threads', type=int, default=1, help='number of 
omp threads to set in MXNet')
+args = parser.parse_args()
+
+# some data information
+kdda = {
+'data_mini': 'kdda.t.mini',
+'data_name': 'kdda.t',
+'data_origin_name': 'kdda.t.bz2',
+'url': 
"https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/kdda.t.bz2;,
+'feature_dim': 20216830,
+'m': 200,
+'batch_size': [64]
+}
+
+avazu = {
+'data_mini': 'avazu-app.t.mini',
+'data_name': 'avazu-app.t',
+'data_origin_name': 'avazu-app.t.bz2',
+'url': 
"https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/avazu-app.t.bz2;,
+'feature_dim': 100,
+'m': 500,
+'batch_size': [64, 128]
+}
+
+
+def measure_cost(wait, repeat, f, *args, **kwargs):
+start = time.time()
+if wait:
+for i in range(repeat):
+(f(*args, **kwargs)).wait_to_read()
+else:
+for i in range(repeat):
+f(*args, **kwargs)
+end = time.time()
+diff = end - start
+return diff / repeat
+
+
+def test_dot_real(data_dict):
+def get_iter(path, data_shape, batch_size):
+data_train = mx.io.LibSVMIter(data_libsvm=path,
+  data_shape=data_shape,
+  batch_size=batch_size)
+data_iter = iter(data_train)
+return data_iter
+
+data_dir = os.path.join(os.getcwd(), 'data')
+
+path = os.path.join(data_dir, data_dict['data_name'])
+if not os.path.exists(path):
+get_data(
+data_dir,
+data_dict['data_name'],
+data_dict['url'],
+data_dict['data_origin_name']
+)
+assert os.path.exists(path)
+
+k = data_dict['feature_dim']
+m = data_dict['m']
+density = estimate_density(path, data_dict['feature_dim'])
+
+mini_path = os.path.join(data_dir, data_dict['data_mini'])
+if not os.path.exists(mini_path):
+os.system("head -n 2000 %r > %r" % (path, mini_path))
+assert os.path.exists(mini_path)
+
+print "Running Benchmarking on %r data" % data_dict['data_mini']
+for batch_size in data_dict['batch_size']:  # iterator through different 
batch size of choice
+print "batch_size is %d" % batch_size
+# model
+data_shape = (k, )
+train_iter = get_iter(mini_path, data_shape, batch_size)
+weight = mx.nd.random_uniform(low=0, high=1, shape=(k, m))
+
+csr_data = []
+dns_data = []
+num_batch = 0
+for batch in train_iter:
+data = train_iter.getdata()
+csr_data.append(data)
+dns_data.append(data.todense())
+num_batch += 1
+bag_of_data = [csr_data, dns_data]
+num_repeat = 5
+costs = []
+for d in bag_of_data:
+weight.wait_to_read()
+cost = 0.
+count = 0
+for d_batch in d:
+d_batch.wait_to_read()
+cost += measure_cost(True, num_repeat, mx.nd.dot, d_batch, 
weight)
+count += 1
+costs.append(cost/count)
+t_sparse = costs[0]
+t_dense = costs[1]
+ratio = t_dense / t_sparse
+print('density(%)\tn\tm\tk\tt_dense/t_sparse\tt_dense\tt_sparse')
+fmt = "%0.4f\t\t%d\t%d\t%d\t%0.2f\t\t\t%0.4f\t%0.6f"
+print(fmt % (density * 100, batch_size, m, k, ratio, t_dense, 
t_sparse))
+
+
+def test_dot_synthetic():
+"""benchmark sparse mxnet dot and scipy dot operator with matrices of 
given density.
+`t_sparse` is the runtime of the invoked sparse dot operator in ms, while 
`t_dense` is the 
+runtime of dot(dns, dns), with the same matrices except that they are in 
default storage type.
+"""
+# Benchmark MXNet's sparse dot operator
+def bench_mx_dot(lhs_shape, rhs_shape, lhs_stype, rhs_stype, lhs_den, 
rhs_den, trans_lhs, ctx, repeat):
+set_default_context(ctx)
+# Create matrix instances
+lhs_nd = rand_ndarray(lhs_shape, lhs_stype, density=lhs_den)
+rhs_nd = rand_ndarray(rhs_shape, rhs_stype, density=rhs_den)
+lhs_dns = lhs_nd if lhs_stype == 'default' else lhs_nd.todense()
+rhs_dns = rhs_nd if rhs_stype == 'default' else rhs_nd.todense()
+# One warm up run, verify correctness
+

[GitHub] tornadomeet opened a new pull request #7374: fix consistency of cpu/gpu in stn

2017-08-07 Thread git
tornadomeet opened a new pull request #7374: fix consistency of cpu/gpu in stn
URL: https://github.com/apache/incubator-mxnet/pull/7374
 
 
   calc of `cpu` and `gpu` is not consistent before this fix, this fix is ref 
to 
https://github.com/apache/incubator-mxnet/blob/master/src/operator/bilinear_sampler.cc
  
https://github.com/apache/incubator-mxnet/blob/master/src/operator/bilinear_sampler.cu
   
   @sxjscience @piiswrong 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] lxn2 closed pull request #7372: Seed numpy random

2017-08-07 Thread git
lxn2 closed pull request #7372: Seed numpy random
URL: https://github.com/apache/incubator-mxnet/pull/7372
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Seed numpy random (#7372)

2017-08-07 Thread lxn2
This is an automated email from the ASF dual-hosted git repository.

lxn2 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 7e24097  Seed numpy random (#7372)
7e24097 is described below

commit 7e24097be4505dda3abad7f8939cf60cf41fd34d
Author: lxn2 
AuthorDate: Mon Aug 7 17:07:45 2017 -0700

Seed numpy random (#7372)
---
 tests/python/unittest/test_operator.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/python/unittest/test_operator.py 
b/tests/python/unittest/test_operator.py
index 7007da6..62a064a 100644
--- a/tests/python/unittest/test_operator.py
+++ b/tests/python/unittest/test_operator.py
@@ -1986,7 +1986,8 @@ def test_instance_normalization():
 def check_l2_normalization(in_shape, mode, ctx=default_context(), 
norm_eps=1e-10):
 data = mx.symbol.Variable('data')
 out = mx.symbol.L2Normalization(data=data, mode=mode, eps=norm_eps)
-np.random.seed()
+# TODO(szha): Seeding this masks failures. We need to do a deep dive for 
failures without this seed.
+np.random.seed(1234)
 in_data = np.random.uniform(-1, 1, in_shape)
 # calculate numpy results
 if mode == 'channel':

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] ysh329 commented on issue #5224: include/dmlc/logging.h:235: [00:59:21] src/io/local_filesys.cc:154: Check failed: allow_null LocalFileSystem: fail to open "model/det1-symbol.json"

2017-08-07 Thread git
ysh329 commented on issue #5224: include/dmlc/logging.h:235: [00:59:21] 
src/io/local_filesys.cc:154: Check failed: allow_null  LocalFileSystem: fail to 
open "model/det1-symbol.json"
URL: 
https://github.com/apache/incubator-mxnet/issues/5224#issuecomment-320811664
 
 
   @novioleo Okay, thanks my dear friend and stupid me. :rofl: 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong opened a new pull request #7373: Update custom.cc

2017-08-07 Thread git
piiswrong opened a new pull request #7373: Update custom.cc
URL: https://github.com/apache/incubator-mxnet/pull/7373
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on a change in pull request #7356: decouple record/train and add state readers

2017-08-07 Thread git
szha commented on a change in pull request #7356: decouple record/train and add 
state readers
URL: https://github.com/apache/incubator-mxnet/pull/7356#discussion_r131777162
 
 

 ##
 File path: python/mxnet/autograd.py
 ##
 @@ -112,6 +137,34 @@ def pause(is_train=False):
 return RecordingStateScope(False, is_train)
 
 
+def override_train():
 
 Review comment:
   Yes, it's equivalent, but the point is on how to use it. To use action-based 
API, user needs to keep track of the training/recording state by themselves, 
whereas a scope-based API does it for you. This is the difference between a 
sequence of get and save current state => set state => revert back the state 
afterwards, versus a simple scope.
   
   Also, imagine that in the model codes you want to do different things based 
on whether it's training or recording. You can't do that with action-based API 
without involving a book keeping for recording status.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on a change in pull request #7356: decouple record/train and add state readers

2017-08-07 Thread git
szha commented on a change in pull request #7356: decouple record/train and add 
state readers
URL: https://github.com/apache/incubator-mxnet/pull/7356#discussion_r131777162
 
 

 ##
 File path: python/mxnet/autograd.py
 ##
 @@ -112,6 +137,34 @@ def pause(is_train=False):
 return RecordingStateScope(False, is_train)
 
 
+def override_train():
 
 Review comment:
   Yes, it's equivalent, but the point is on how to use it. To use action-based 
API, user needs to keep track of the training/recording state by themselves, 
whereas a scope-based API does it for you. This is the difference between a 
sequence of get and save current state => set state => revert back the state 
afterwards, versus a simple scope.
   
   Also, imagine that in the model codes you want to do different things based 
on whether it's training or predicting. You can't do that with action-based API 
without involving a book keeping for recording status.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zackchase commented on a change in pull request #7356: decouple record/train and add state readers

2017-08-07 Thread git
zackchase commented on a change in pull request #7356: decouple record/train 
and add state readers
URL: https://github.com/apache/incubator-mxnet/pull/7356#discussion_r131773045
 
 

 ##
 File path: python/mxnet/autograd.py
 ##
 @@ -112,6 +137,34 @@ def pause(is_train=False):
 return RecordingStateScope(False, is_train)
 
 
+def override_train():
 
 Review comment:
   Thanks @szha for working hard to resolve these issues.
   I really like that you've added setters / getters for training and recording 
and am relieved to see them decoupled. 
   
   So one question is - 
   Is predict =True equivalent to training=False? 
   If so then we would only need to set training and I'd agree with Eric that 
we could hold off on adding predict() right now for fear of introducing 
redundancy. Still we have a tough situation for a modeler who wants at will to 
be able to run forward passes with dropout on vs off. It's hard to see how they 
can turn dropout on/off without messing with batchnorm.
   
   For me, the main idea for having a predict(): scope would be *if the default 
were training=True*. I tend to think that tis should be the case. 
   
   **Argument: If you just instantiate a Dropout layer and call forward on it, 
you'd expect the Dropout to be applied**
   
   At the same time I'm cognizant of Eric's belief that this breaks from the 
previous way of doing things and might harm backwards compatibility in some 
sense.
   
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot commented on issue #7370: Error when trying to build docker image with GPU and S3 support

2017-08-07 Thread git
LakeCarrot commented on issue #7370: Error when trying to build docker image 
with GPU and S3 support
URL: 
https://github.com/apache/incubator-mxnet/issues/7370#issuecomment-320783278
 
 
   @piiswrong It can work if I only make the dmlc-core library. I wonder how 
can I install S3 library? Does that mean I need to install the s3 cil? Thanks!
   And also, I have tried the distributed MXNet with CPU and S3 support, 
everything goes fine. And I didn't manually install any S3 library.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot commented on issue #7370: Error when trying to build docker image with GPU and S3 support

2017-08-07 Thread git
LakeCarrot commented on issue #7370: Error when trying to build docker image 
with GPU and S3 support
URL: 
https://github.com/apache/incubator-mxnet/issues/7370#issuecomment-320783278
 
 
   @piiswrong It can work if I only make the dmlc-core library. I wonder how 
can I install S3 library? Does that mean I need to install the s3 cil? Thanks!
   And also, I have tried the distributed MXNet with CPU and S3 support, 
everything goes fine. In that case, I didn't manually install any S3 library.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Small fix for versioning doc build (#7371)

2017-08-07 Thread lxn2
This is an automated email from the ASF dual-hosted git repository.

lxn2 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 63ae4c9  Small fix for versioning doc build (#7371)
63ae4c9 is described below

commit 63ae4c9865d19bff68ddf0f00de5f5ebe88466eb
Author: Yao Wang 
AuthorDate: Mon Aug 7 14:15:33 2017 -0700

Small fix for versioning doc build (#7371)
---
 docs/build_version_doc/build_doc.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/build_version_doc/build_doc.sh 
b/docs/build_version_doc/build_doc.sh
index 046dae2..99b6bd8 100755
--- a/docs/build_version_doc/build_doc.sh
+++ b/docs/build_version_doc/build_doc.sh
@@ -6,7 +6,7 @@ local_build="latest"
 web_branch="$2"
 git clone $web_url $web_folder
 cd $web_folder
-git checkout -b $web_branch "origin/$web_branch"
+git checkout $web_branch 
 cd ..
 mkdir "$local_build"
 
@@ -51,7 +51,7 @@ then
 fi
 
 # Build latest master
-git checkout VersionedDoc
+git checkout master
 git checkout -- .
 git submodule update
 echo "Building master"

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] lxn2 closed pull request #7371: Small fix for versioning doc build

2017-08-07 Thread git
lxn2 closed pull request #7371: Small fix for versioning doc build
URL: https://github.com/apache/incubator-mxnet/pull/7371
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet-site] branch asf-site updated: Fix master version links

2017-08-07 Thread lxn2
This is an automated email from the ASF dual-hosted git repository.

lxn2 pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new e8ff4ab  Fix master version links
e8ff4ab is described below

commit e8ff4ab190d56f31cff5617693ada8616b5e597c
Author: Nguyen 
AuthorDate: Mon Aug 7 14:09:25 2017 -0700

Fix master version links
---
 index.html | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/index.html b/index.html
index 65b7641..5f95a64 100644
--- a/index.html
+++ b/index.html
@@ -150,7 +150,7 @@ Previous Navbar Layout End -->
 Architecture
 
 https://github.com/dmlc/mxnet;>Github
-Versions(0.10)http://localhost:8008/>0.10http://localhost:8008/versions/master/index.html>master
+Versions(0.10)https://mxnet.incubator.apache.org/>0.10https://mxnet.incubator.apache.org/versions/master/index.html>master 
[...]
  function getRootPath(){ return "./" } 
 
 ☰
@@ -177,7 +177,7 @@ Previous Navbar Layout End -->
 
 Architecture
 https://github.com/dmlc/mxnet;>Github
-Versions(0.10)http://localhost:8008/>0.10http://localhost:8008/versions/master/index.html>master
+Versions(0.10)https://mxnet.incubator.apache.org/>0.10https://mxnet.incubator.apache.org/versions/master/index.html>master
 
 
 
@@ -344,4 +344,4 @@ Previous Navbar Layout End -->
 });
 
 
-
\ No newline at end of file
+

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] piiswrong commented on issue #7370: Error when trying to build docker image with GPU and S3 support

2017-08-07 Thread git
piiswrong commented on issue #7370: Error when trying to build docker image 
with GPU and S3 support
URL: 
https://github.com/apache/incubator-mxnet/issues/7370#issuecomment-320776310
 
 
   It's probably because your docker is not configured to have S3 library 
installed.
   
   Does it work if you cd dmlc-core and make only the dmlc-core library?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: disable vgg-16 resnet converter check (#7369)

2017-08-07 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new ef383c2  disable vgg-16 resnet converter check (#7369)
ef383c2 is described below

commit ef383c28bd4fdd69b2a489bb51c86dcc73b7b104
Author: Joshua Z. Zhang 
AuthorDate: Mon Aug 7 13:43:20 2017 -0700

disable vgg-16 resnet converter check (#7369)
---
 tools/caffe_converter/test_converter.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/caffe_converter/test_converter.py 
b/tools/caffe_converter/test_converter.py
index c7eb86b..7572d29 100644
--- a/tools/caffe_converter/test_converter.py
+++ b/tools/caffe_converter/test_converter.py
@@ -78,7 +78,7 @@ def main():
 assert gpus, 'At least one GPU is needed to run test_converter in GPU 
mode'
 batch_size = 32 * len(gpus)
 
-models = ['bvlc_googlenet', 'vgg-16', 'resnet-50']
+models = ['bvlc_googlenet']
 
 val = download_data()
 for m in models:

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] piiswrong closed pull request #7369: Revive CI by disabling caffe converter check temporarily

2017-08-07 Thread git
piiswrong closed pull request #7369: Revive CI by disabling caffe converter 
check temporarily
URL: https://github.com/apache/incubator-mxnet/pull/7369
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services



[GitHub] LakeCarrot commented on issue #7370: Error when trying to build docker image with GPU and S3 support

2017-08-07 Thread git
LakeCarrot commented on issue #7370: Error when trying to build docker image 
with GPU and S3 support
URL: 
https://github.com/apache/incubator-mxnet/issues/7370#issuecomment-320753978
 
 
   The dockerfile file is based on 
https://github.com/apache/incubator-mxnet/tree/master/docker
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot commented on issue #7370: Error when trying to build docker image with GPU and S3 support

2017-08-07 Thread git
LakeCarrot commented on issue #7370: Error when trying to build docker image 
with GPU and S3 support
URL: 
https://github.com/apache/incubator-mxnet/issues/7370#issuecomment-320753289
 
 
   It seems that it because I set the S3 flag on. If I didn't set the S3 flag 
and using the exactly the same dockerfile to build the image, everything goes 
well.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7369: Revive CI by disabling caffe converter check temporarily

2017-08-07 Thread git
szha commented on issue #7369: Revive CI by disabling caffe converter check 
temporarily
URL: https://github.com/apache/incubator-mxnet/pull/7369#issuecomment-320769520
 
 
   @lxn2 per offline discussion, travis should be turned off.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] kevinthesun opened a new pull request #7371: Small fix for versioning doc build

2017-08-07 Thread git
kevinthesun opened a new pull request #7371: Small fix for versioning doc build
URL: https://github.com/apache/incubator-mxnet/pull/7371
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot commented on issue #7370: Error when trying to build docker image with GPU and S3 support

2017-08-07 Thread git
LakeCarrot commented on issue #7370: Error when trying to build docker image 
with GPU and S3 support
URL: 
https://github.com/apache/incubator-mxnet/issues/7370#issuecomment-320753727
 
 
   I have also tried cloning the master branch, but got the same error message
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zhreshold opened a new pull request #7369: Revive CI by disabling caffe converter check temporarily

2017-08-07 Thread git
zhreshold opened a new pull request #7369: Revive CI by disabling caffe 
converter check temporarily
URL: https://github.com/apache/incubator-mxnet/pull/7369
 
 
   @piiswrong @joey2014 
   Temporarily disable test check for vgg16 and resnet to let all CI going 
until we can fix this.
   
   The problems are described in #7368
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zhreshold opened a new issue #7368: Caffe converter test fails, causing CI to halt for all PRs

2017-08-07 Thread git
zhreshold opened a new issue #7368: Caffe converter test fails, causing CI to 
halt for all PRs
URL: https://github.com/apache/incubator-mxnet/issues/7368
 
 
   ## Steps to reproduce
   or if you are running standard examples, please provide the commands you 
have run that lead to the error.
   
   1. python tools/caffe_converter/test_converter.py
   2.
   3.
   
   ## What have you tried to solve it?
   Tried to debug the metric_update process, figured out for vgg-16 and resnet, 
the network prediction output is wrong, we have the last conv output mixed to 
the final prediction. Thus causing the mismatched shape with label.
   ```
   ('!!!labels', 1, (32L,))
   ('!!!preds', 2, (32L, 1000L), (32L, 512L, 7L, 7L))
   ```
   For googlenet, the output is correct:
   ```
   ('!!!labels', 1, (32L,))
   ('!!!preds', 2, (32L, 1000L))
   ```
   @joey2014 
   
https://builds.apache.org/blue/organizations/jenkins/incubator-mxnet/detail/master/152/pipeline/
   
   ```
   INFO:root:Saved checkpoint to "./model/vgg-16-.params"
   data/val-5k-256.rec
   [18:21:16] src/io/iter_image_recordio_2.cc:135: ImageRecordIOParser2: 
data/val-5k-256.rec, use 4 threads for decoding..
   ('!!!labels', 1, (32L,))
   ('!!!preds', 2, (32L, 1000L), (32L, 512L, 7L, 7L))
   Traceback (most recent call last):
 File "test_converter.py", line 89, in 
   main()
 File "test_converter.py", line 86, in main
   test_imagenet_model_performance(m, val, gpus, batch_size)
 File "test_converter.py", line 38, in test_imagenet_model_performance
   **mean_args)
 File 
"/home/ubuntu/debug/incubator-mxnet/tools/caffe_converter/../../example/image-classification/score.py",
 line 60, in score
   mod.update_metric(m, batch.label)
 File "/home/ubuntu/verify/mxnet/python/mxnet/module/module.py", line 718, 
in update_metric
   self._exec_group.update_metric(eval_metric, labels)
 File "/home/ubuntu/verify/mxnet/python/mxnet/module/executor_group.py", 
line 565, in update_metric
   eval_metric.update_dict(labels_, preds)
 File "/home/ubuntu/verify/mxnet/python/mxnet/metric.py", line 91, in 
update_dict
   self.update(label, pred)
 File "/home/ubuntu/verify/mxnet/python/mxnet/metric.py", line 373, in 
update
   check_label_shapes(labels, preds)
 File "/home/ubuntu/verify/mxnet/python/mxnet/metric.py", line 24, in 
check_label_shapes
   "predictions {}".format(label_shape, pred_shape))
   ValueError: Shape of labels 1 does not match shape of predictions 2
   ```
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot commented on issue #7341: Usage of Tensorboard in Distributed MXNet

2017-08-07 Thread git
LakeCarrot commented on issue #7341: Usage of Tensorboard in Distributed MXNet
URL: 
https://github.com/apache/incubator-mxnet/issues/7341#issuecomment-320745838
 
 
   @zihaolucky Thanks for your reply. I have read through that example. One 
thing I want to double check is for now, the Tensorboard for MXNet only provide 
support for read data from local disk right? There is no support for reading 
from cloud storage like S3, Azure or distributed file system like HDFS.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot commented on issue #7341: Usage of Tensorboard in Distributed MXNet

2017-08-07 Thread git
LakeCarrot commented on issue #7341: Usage of Tensorboard in Distributed MXNet
URL: 
https://github.com/apache/incubator-mxnet/issues/7341#issuecomment-320745838
 
 
   @zihaolucky Thanks for your reply. I have read through that example.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot opened a new issue #7341: Usage of Tensorboard in Distributed MXNet

2017-08-07 Thread git
LakeCarrot opened a new issue #7341: Usage of Tensorboard in Distributed MXNet
URL: https://github.com/apache/incubator-mxnet/issues/7341
 
 
   Hi all,
   I tried to use Tensorboard to visualize my model training process. In the 
single-node training mode, the usage of Tensorboard is straightforward. Thing 
is different when it comes to the distributed training mode. Suppose I have 2 
servers and 4 workers in my cluster, how can I use Tensorboard to track the 
overall training process? Basically, I can imagine there will be 4 different 
set of log files locate in each worker, and I need to use 4 separate 
Tensorboard processes to visualize the whole process.
   After some research, I found the following question on StackOverflow, which 
said that in TensorFlow, only one of the workers need to write the log.
   
https://stackoverflow.com/questions/37411005/unable-to-use-tensorboard-in-distributed-tensorflow
   I wonder what is the by-design usage of Tensorboard in Distributed MXNet? My 
main concern of writing summary on one of the worker is whether the log from a 
single worker can be a good representative to the overall learning process.
   @zihaolucky Thanks a lot for your work to make the Tensorboard on MXNet come 
true. I wonder do you have any idea of my question?
   Thanks in advance!
   Bo
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] LakeCarrot closed issue #7341: Usage of Tensorboard in Distributed MXNet

2017-08-07 Thread git
LakeCarrot closed issue #7341: Usage of Tensorboard in Distributed MXNet
URL: https://github.com/apache/incubator-mxnet/issues/7341
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rahul003 commented on issue #7321: fixes broken compilation by including tensor_blob

2017-08-07 Thread git
rahul003 commented on issue #7321: fixes broken compilation by including 
tensor_blob
URL: https://github.com/apache/incubator-mxnet/pull/7321#issuecomment-320741353
 
 
   @piiswrong So what needs to be done to ensure mxnet compiles fine? 
Alternative suggestion?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rahul003 commented on issue #7321: fixes broken compilation by including tensor_blob

2017-08-07 Thread git
rahul003 commented on issue #7321: fixes broken compilation by including 
tensor_blob
URL: https://github.com/apache/incubator-mxnet/pull/7321#issuecomment-320741353
 
 
   @piiswrong So what needs to be done to ensure mxnet compiles fine?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on a change in pull request #7304: gluon bce & ctc losses

2017-08-07 Thread git
szha commented on a change in pull request #7304: gluon bce & ctc losses
URL: https://github.com/apache/incubator-mxnet/pull/7304#discussion_r131727657
 
 

 ##
 File path: python/mxnet/gluon/loss.py
 ##
 @@ -142,6 +144,46 @@ def hybrid_forward(self, F, output, label, 
sample_weight=None):
 return F.mean(loss, axis=self._batch_axis, exclude=True)
 
 
+class BinaryCrossEntropyLoss(Loss):
+r"""The cross-entropy loss for binary classification.
+
+BCE loss is useful when training logistic regression.
+
+.. math::
+loss(o, t) = - 1/n \sum_i (t[i] * log(o[i]) + (1 - t[i]) * log(1 - 
o[i]))
+
+
+Parameters
+--
+from_sigmoid : bool, default is `False`
+Whether the input is from the output of sigmoid. Set this to false 
will make
+the loss calculate sigmoid and then BCE, which is more numerically 
stable through
+log-sum-exp trick.
+weight : float or None
+Global scalar weight for loss.
+sample_weight : Symbol or None
+Per sample weighting. Must be broadcastable to
+the same shape as loss. For example, if loss has
+shape (64, 10) and you want to weight each sample
+in the batch, `sample_weight` should have shape (64, 1).
+batch_axis : int, default 0
+The axis that represents mini-batch.
+"""
+def __init__(self, from_sigmoid=False, weight=None, batch_axis=0, 
**kwargs):
+super(BinaryCrossEntropyLoss, self).__init__(weight, batch_axis, 
**kwargs)
+self._from_sigmoid = from_sigmoid
+
+def hybrid_forward(self, F, output, label, sample_weight=None):
+label = label.reshape((-1, 1))
 
 Review comment:
   Got it. I see it happening three times in the code, so I will refactor this 
part to a utility function.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] thirdwing commented on issue #7219: [R] How to include a minimum function in MakeLoss

2017-08-07 Thread git
thirdwing commented on issue #7219: [R] How to include a minimum function in 
MakeLoss
URL: 
https://github.com/apache/incubator-mxnet/issues/7219#issuecomment-320731728
 
 
   @solalm You will be able to use `mx.symbol.min(fc_abs, 1)` if you use the 
latest code.
   
   The prebuilt pkg will contain the fix in next release.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7304: gluon bce & ctc losses

2017-08-07 Thread git
piiswrong commented on a change in pull request #7304: gluon bce & ctc losses
URL: https://github.com/apache/incubator-mxnet/pull/7304#discussion_r131714163
 
 

 ##
 File path: python/mxnet/gluon/loss.py
 ##
 @@ -239,3 +281,59 @@ def hybrid_forward(self, F, output, label, 
sample_weight=None):
 loss = label * (F.log(label+1e-8) - output)
 loss = _apply_weighting(F, loss, self._weight, sample_weight)
 return F.mean(loss, axis=self._batch_axis, exclude=True)
+
+class CTCLoss(Loss):
+r"""Connectionist Temporal Classification Loss.
+
+See `"Connectionist Temporal Classification: Labelling Unsegmented
+Sequence Data with Recurrent Neural Networks"
+`_ paper for more 
information.
+
+The prediction output should be an activation vector without softmax, with 
shape
+according to the output_layout:
+**TNC**: *(sequence_length, batch_size, alphabet_size + 1)*
+**NTC**: *(batch_size, sequence_length, alphabet_size + 1)*
+**out**: *(batch_size)*.
+
+``label`` is a tensor of integers between 1 and *alphabet_size*, with 
shape according
+to the batch_axis:
+**batch_axis=0**: *(batch_size, label_sequence_length)*
+**batch_axis=1**: *(label_sequence_length, batch_size)*
+
+If a sequence of labels is shorter than *label_sequence_length*, use the 
special
+padding character 0 at the end of the sequence to conform it to the correct
+length. For example, if *label_sequence_length* = 4, and one has two 
sequences
+of labels [2, 1] and [3, 2, 2], the resulting ```label``` tensor should be
+padded to be::
+
+  [[2, 1, 0, 0], [3, 2, 2, 0]]
 
 Review comment:
   does it mean the labels are one based?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7304: gluon bce & ctc losses

2017-08-07 Thread git
piiswrong commented on a change in pull request #7304: gluon bce & ctc losses
URL: https://github.com/apache/incubator-mxnet/pull/7304#discussion_r131713902
 
 

 ##
 File path: python/mxnet/gluon/loss.py
 ##
 @@ -239,3 +281,59 @@ def hybrid_forward(self, F, output, label, 
sample_weight=None):
 loss = label * (F.log(label+1e-8) - output)
 loss = _apply_weighting(F, loss, self._weight, sample_weight)
 return F.mean(loss, axis=self._batch_axis, exclude=True)
+
+class CTCLoss(Loss):
+r"""Connectionist Temporal Classification Loss.
+
+See `"Connectionist Temporal Classification: Labelling Unsegmented
+Sequence Data with Recurrent Neural Networks"
+`_ paper for more 
information.
+
+The prediction output should be an activation vector without softmax, with 
shape
+according to the output_layout:
+**TNC**: *(sequence_length, batch_size, alphabet_size + 1)*
+**NTC**: *(batch_size, sequence_length, alphabet_size + 1)*
+**out**: *(batch_size)*.
 
 Review comment:
   separate section for out and rename to loss
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7304: gluon bce & ctc losses

2017-08-07 Thread git
piiswrong commented on a change in pull request #7304: gluon bce & ctc losses
URL: https://github.com/apache/incubator-mxnet/pull/7304#discussion_r131713817
 
 

 ##
 File path: python/mxnet/gluon/loss.py
 ##
 @@ -239,3 +281,59 @@ def hybrid_forward(self, F, output, label, 
sample_weight=None):
 loss = label * (F.log(label+1e-8) - output)
 loss = _apply_weighting(F, loss, self._weight, sample_weight)
 return F.mean(loss, axis=self._batch_axis, exclude=True)
+
+class CTCLoss(Loss):
+r"""Connectionist Temporal Classification Loss.
+
+See `"Connectionist Temporal Classification: Labelling Unsegmented
+Sequence Data with Recurrent Neural Networks"
+`_ paper for more 
information.
+
+The prediction output should be an activation vector without softmax, with 
shape
+according to the output_layout:
+**TNC**: *(sequence_length, batch_size, alphabet_size + 1)*
+**NTC**: *(batch_size, sequence_length, alphabet_size + 1)*
+**out**: *(batch_size)*.
+
+``label`` is a tensor of integers between 1 and *alphabet_size*, with 
shape according
+to the batch_axis:
+**batch_axis=0**: *(batch_size, label_sequence_length)*
+**batch_axis=1**: *(label_sequence_length, batch_size)*
+
+If a sequence of labels is shorter than *label_sequence_length*, use the 
special
+padding character 0 at the end of the sequence to conform it to the correct
+length. For example, if *label_sequence_length* = 4, and one has two 
sequences
+of labels [2, 1] and [3, 2, 2], the resulting ```label``` tensor should be
+padded to be::
+
+  [[2, 1, 0, 0], [3, 2, 2, 0]]
+
+
+Parameters
+--
+output_layout : str, default 'NTC'
+Layout of the output sequence activation vector.
+weight : float or None
+Global scalar weight for loss.
+sample_weight : Symbol or None
+Per sample weighting. Must be broadcastable to
+the same shape as loss. For example, if loss has
+shape (64, 10) and you want to weight each sample
+in the batch, `sample_weight` should have shape (64, 1).
+batch_axis : int, default 0
+The axis in label that represents mini-batch.
+"""
+def __init__(self, output_layout='NTC', weight=None, batch_axis=0, 
**kwargs):
 
 Review comment:
   output_layout & label_layout
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] thirdwing commented on issue #7364: MxnetR chunk-wise neural nets

2017-08-07 Thread git
thirdwing commented on issue #7364: MxnetR chunk-wise neural nets
URL: 
https://github.com/apache/incubator-mxnet/issues/7364#issuecomment-320725815
 
 
   I think we have a document on similar situations: 
https://github.com/apache/incubator-mxnet/blob/master/R-package/vignettes/CatsDogsFinetune.Rmd#load-pretrained-model
   
   Let me know if this helps.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7304: gluon bce & ctc losses

2017-08-07 Thread git
piiswrong commented on a change in pull request #7304: gluon bce & ctc losses
URL: https://github.com/apache/incubator-mxnet/pull/7304#discussion_r131712363
 
 

 ##
 File path: python/mxnet/gluon/loss.py
 ##
 @@ -142,6 +144,46 @@ def hybrid_forward(self, F, output, label, 
sample_weight=None):
 return F.mean(loss, axis=self._batch_axis, exclude=True)
 
 
+class BinaryCrossEntropyLoss(Loss):
+r"""The cross-entropy loss for binary classification.
+
+BCE loss is useful when training logistic regression.
+
+.. math::
+loss(o, t) = - 1/n \sum_i (t[i] * log(o[i]) + (1 - t[i]) * log(1 - 
o[i]))
+
+
+Parameters
+--
+from_sigmoid : bool, default is `False`
+Whether the input is from the output of sigmoid. Set this to false 
will make
+the loss calculate sigmoid and then BCE, which is more numerically 
stable through
+log-sum-exp trick.
+weight : float or None
+Global scalar weight for loss.
+sample_weight : Symbol or None
+Per sample weighting. Must be broadcastable to
+the same shape as loss. For example, if loss has
+shape (64, 10) and you want to weight each sample
+in the batch, `sample_weight` should have shape (64, 1).
+batch_axis : int, default 0
+The axis that represents mini-batch.
+"""
+def __init__(self, from_sigmoid=False, weight=None, batch_axis=0, 
**kwargs):
+super(BinaryCrossEntropyLoss, self).__init__(weight, batch_axis, 
**kwargs)
+self._from_sigmoid = from_sigmoid
+
+def hybrid_forward(self, F, output, label, sample_weight=None):
+label = label.reshape((-1, 1))
 
 Review comment:
   see l1loss for how to reshape
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Fix data tutorial (#7329)

2017-08-07 Thread madjam
This is an automated email from the ASF dual-hosted git repository.

madjam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new c198572  Fix data tutorial (#7329)
c198572 is described below

commit c1985725c4a877a3658cafd4e791aafb4c063e55
Author: Yao Wang 
AuthorDate: Mon Aug 7 10:08:11 2017 -0700

Fix data tutorial (#7329)
---
 docs/tutorials/basic/data.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/tutorials/basic/data.md b/docs/tutorials/basic/data.md
index dba1391..93a1db0 100644
--- a/docs/tutorials/basic/data.md
+++ b/docs/tutorials/basic/data.md
@@ -19,7 +19,7 @@ $ pip install opencv-python requests matplotlib jupyter
 
 ```
 $ git clone https://github.com/dmlc/mxnet ~/mxnet
-$ MXNET_HOME = '~/mxnet'
+$ export MXNET_HOME='~/mxnet'
 ```
 
 ## MXNet Data Iterator  
@@ -366,7 +366,7 @@ Now let's convert them into record io format using the 
`im2rec.py` utility scrip
 First, we need to make a list that contains all the image files and their 
categories:
 
 ```python
-os.system('python %s/tools/im2rec.py --list=1 --recursive=1 --shuffle=1 
--test-ratio=0.2 data/caltech data/101_ObjectCategories'%MXNET_HOME)
+os.system('python %s/tools/im2rec.py --list=1 --recursive=1 --shuffle=1 
--test-ratio=0.2 data/caltech 
data/101_ObjectCategories'%os.environ['MXNET_HOME'])
 ```
 
 The resulting list file (./data/caltech_train.lst) is in the format 
`index\t(one or more label)\tpath`. In this case, there is only one label for 
each image but you can modify the list to add in more for multi-label training.
@@ -375,7 +375,7 @@ Then we can use this list to create our record io file:
 
 
 ```python
-os.system("python %s/tools/im2rec.py --num-thread=4 --pass-through=1 
data/caltech data/101_ObjectCategories"%MXNET_HOME)
+os.system("python %s/tools/im2rec.py --num-thread=4 --pass-through=1 
data/caltech data/101_ObjectCategories"%os.environ['MXNET_HOME'])
 ```
 
 The record io files are now saved at here (./data)

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] madjam closed pull request #7329: Fix data tutorial

2017-08-07 Thread git
madjam closed pull request #7329: Fix data tutorial
URL: https://github.com/apache/incubator-mxnet/pull/7329
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] idealboy commented on issue #7366: About distribute trainning, How can I set different gpu device id on different worker?

2017-08-07 Thread git
idealboy commented on issue #7366: About distribute trainning, How can I set 
different gpu device id on different worker?
URL: 
https://github.com/apache/incubator-mxnet/issues/7366#issuecomment-320712976
 
 
   when I use the tools launch.py to trainning on multi-gpus in different 
machines, How can I set diffenrent device ID for each worker node? Because all 
my available gpus are not located the same device ID.
   
   Thank you very much
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on issue #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on issue #7363: Add tensorboard configure into 
./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#issuecomment-320658706
 
 
   @piiswrong Could you give some suggestions?
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dma100180 closed issue #7336: io.cc:54: Data and label shape in-consistent

2017-08-07 Thread git
dma100180 closed issue #7336: io.cc:54: Data and label shape in-consistent
URL: https://github.com/apache/incubator-mxnet/issues/7336
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] dma100180 commented on issue #7336: io.cc:54: Data and label shape in-consistent

2017-08-07 Thread git
dma100180 commented on issue #7336: io.cc:54: Data and label shape in-consistent
URL: 
https://github.com/apache/incubator-mxnet/issues/7336#issuecomment-320658453
 
 
   Hello, yes, that was the problem, I changed it and I can continue!
   
   Thank you very much for your help, regards
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ysh329 opened a new pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
ysh329 opened a new pull request #7363: Add tensorboard configure into 
./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363
 
 
   Some users, including me, are confused about tensorboard usage, which after 
making tensorboard enable, it only draws accuracy curve of training set, not 
containing accuracy curve of evaluation set.
   
   Besides, the pip of tensorboard for MXNet pip is still in construction, 
after finishing, we'll add these parameters (`train_log`, `eval_log`) into args 
of parser.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ysh329 commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
ysh329 commented on a change in pull request #7363: Add tensorboard configure 
into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131638833
 
 

 ##
 File path: example/image-classification/train_mnist.py
 ##
 @@ -75,5 +75,13 @@ def get_mnist_iter(args, kv):
 net = import_module('symbols.'+args.network)
 sym = net.get_symbol(**vars(args))
 
+# tensorboard logs
+train_log = 'logs/mnist/train'
+eval_log = 'logs/mnist/eval'
+batch_end_callbacks = 
[mx.contrib.tensorboard.LogMetricsCallback(train_log)]
 
 Review comment:
   @zihaolucky After `pip install tensorboard` in Docker, I found another 
problem :sob: 
   ```Shell
   
root@65ea267b5b52:~/incubator-mxnet-0.10.0.post2/example/image-classification# 
python train_mnist.py 
   INFO:root:start with arguments Namespace(add_stn=False, batch_size=64, 
disp_batches=100, dtype='float32', gpus=None, kv_store='device', 
load_epoch=None, lr=0.05, lr_factor=0.1, lr_step_epochs='10', 
model_prefix=None, mom=0.9, monitor=0, network='mlp', num_classes=10, 
num_epochs=20, num_examples=6, num_layers=None, optimizer='sgd', test_io=0, 
top_k=0, wd=0.0001)
   Traceback (most recent call last):
 File "train_mnist.py", line 87, in 
   eval_end_callback = eval_end_callbacks)
 File 
"/root/incubator-mxnet-0.10.0.post2/example/image-classification/common/fit.py",
 line 197, in fit
   monitor= monitor)
 File "/mxnet/python/mxnet/module/base_module.py", line 465, in fit
   optimizer_params=optimizer_params)
 File "/mxnet/python/mxnet/module/module.py", line 478, in init_optimizer
   **optimizer_params)
 File "/mxnet/python/mxnet/optimizer.py", line 128, in create_optimizer
   return Optimizer.opt_registry[name.lower()](**kwargs)
 File "/mxnet/python/mxnet/optimizer.py", line 328, in __init__
   super(SGD, self).__init__(**kwargs)
   TypeError: __init__() got an unexpected keyword argument 'multi_precision'
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ysh329 commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
ysh329 commented on a change in pull request #7363: Add tensorboard configure 
into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131638833
 
 

 ##
 File path: example/image-classification/train_mnist.py
 ##
 @@ -75,5 +75,13 @@ def get_mnist_iter(args, kv):
 net = import_module('symbols.'+args.network)
 sym = net.get_symbol(**vars(args))
 
+# tensorboard logs
+train_log = 'logs/mnist/train'
+eval_log = 'logs/mnist/eval'
+batch_end_callbacks = 
[mx.contrib.tensorboard.LogMetricsCallback(train_log)]
 
 Review comment:
   @zihaolucky I found another problem :sob: 
   ```Shell
   
root@65ea267b5b52:~/incubator-mxnet-0.10.0.post2/example/image-classification# 
python train_mnist.py 
   INFO:root:start with arguments Namespace(add_stn=False, batch_size=64, 
disp_batches=100, dtype='float32', gpus=None, kv_store='device', 
load_epoch=None, lr=0.05, lr_factor=0.1, lr_step_epochs='10', 
model_prefix=None, mom=0.9, monitor=0, network='mlp', num_classes=10, 
num_epochs=20, num_examples=6, num_layers=None, optimizer='sgd', test_io=0, 
top_k=0, wd=0.0001)
   Traceback (most recent call last):
 File "train_mnist.py", line 87, in 
   eval_end_callback = eval_end_callbacks)
 File 
"/root/incubator-mxnet-0.10.0.post2/example/image-classification/common/fit.py",
 line 197, in fit
   monitor= monitor)
 File "/mxnet/python/mxnet/module/base_module.py", line 465, in fit
   optimizer_params=optimizer_params)
 File "/mxnet/python/mxnet/module/module.py", line 478, in init_optimizer
   **optimizer_params)
 File "/mxnet/python/mxnet/optimizer.py", line 128, in create_optimizer
   return Optimizer.opt_registry[name.lower()](**kwargs)
 File "/mxnet/python/mxnet/optimizer.py", line 328, in __init__
   super(SGD, self).__init__(**kwargs)
   TypeError: __init__() got an unexpected keyword argument 'multi_precision'
   ```
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131634523
 
 

 ##
 File path: example/image-classification/train_mnist.py
 ##
 @@ -75,5 +75,13 @@ def get_mnist_iter(args, kv):
 net = import_module('symbols.'+args.network)
 sym = net.get_symbol(**vars(args))
 
+# tensorboard logs
+train_log = 'logs/mnist/train'
+eval_log = 'logs/mnist/eval'
+batch_end_callbacks = 
[mx.contrib.tensorboard.LogMetricsCallback(train_log)]
 
 Review comment:
   @ysh329 You don't have to close it, just submit another commit and it would 
be great.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ysh329 commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
ysh329 commented on a change in pull request #7363: Add tensorboard configure 
into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131634218
 
 

 ##
 File path: example/image-classification/train_mnist.py
 ##
 @@ -75,5 +75,13 @@ def get_mnist_iter(args, kv):
 net = import_module('symbols.'+args.network)
 sym = net.get_symbol(**vars(args))
 
+# tensorboard logs
+train_log = 'logs/mnist/train'
+eval_log = 'logs/mnist/eval'
+batch_end_callbacks = 
[mx.contrib.tensorboard.LogMetricsCallback(train_log)]
 
 Review comment:
   Okay
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ysh329 closed pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
ysh329 closed pull request #7363: Add tensorboard configure into 
./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on issue #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on issue #7363: Add tensorboard configure into 
./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#issuecomment-320642110
 
 
   I'm going to upload the package to another PyPI this week, might consider 
using `tensorboard-lite`.
   
   The next step is to move the backend to 
https://github.com/tensorflow/tensorboard, the experimental code could be found 
here 
https://github.com/zihaolucky/tensorboard-lite/tree/exp/add-tf-as-local-dep.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131629755
 
 

 ##
 File path: example/image-classification/common/fit.py
 ##
 @@ -168,10 +168,16 @@ def fit(args, network, data_loader, **kwargs):
 
 # callbacks that run after each batch
 batch_end_callbacks = [mx.callback.Speedometer(args.batch_size, 
args.disp_batches)]
+eval_end_callbacks = []
 if 'batch_end_callback' in kwargs:
 cbs = kwargs['batch_end_callback']
 batch_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
 Review comment:
   Have you verified if the logging works correctly when using `Speedometer` 
and `LogMetricsCallback` at the same time? Both speedometer and tensorboard 
logging.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131632018
 
 

 ##
 File path: example/image-classification/train_mnist.py
 ##
 @@ -75,5 +75,13 @@ def get_mnist_iter(args, kv):
 net = import_module('symbols.'+args.network)
 sym = net.get_symbol(**vars(args))
 
+# tensorboard logs
+train_log = 'logs/mnist/train'
+eval_log = 'logs/mnist/eval'
+batch_end_callbacks = 
[mx.contrib.tensorboard.LogMetricsCallback(train_log)]
 
 Review comment:
   If some one hasn't install tensorboard yet, it might throw an exception. 
Consider making it an optional feature.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on issue #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on issue #7363: Add tensorboard configure into 
./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#issuecomment-320637764
 
 
   I think the TensorBoard related code is correct, but we have to make this 
example more consistent and easy to understand, as these examples are used by 
almost every user.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131629755
 
 

 ##
 File path: example/image-classification/common/fit.py
 ##
 @@ -168,10 +168,16 @@ def fit(args, network, data_loader, **kwargs):
 
 # callbacks that run after each batch
 batch_end_callbacks = [mx.callback.Speedometer(args.batch_size, 
args.disp_batches)]
+eval_end_callbacks = []
 if 'batch_end_callback' in kwargs:
 cbs = kwargs['batch_end_callback']
 batch_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
 Review comment:
   Have you verified if the logging works correctly when using Speedometer and 
LogMetricsCallback at the same time? Both speedometer and tensorboard logging.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131629394
 
 

 ##
 File path: example/image-classification/common/fit.py
 ##
 @@ -168,10 +168,16 @@ def fit(args, network, data_loader, **kwargs):
 
 # callbacks that run after each batch
 batch_end_callbacks = [mx.callback.Speedometer(args.batch_size, 
args.disp_batches)]
+eval_end_callbacks = []
 if 'batch_end_callback' in kwargs:
 cbs = kwargs['batch_end_callback']
 batch_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
 Review comment:
   Have you verified if the logging works correctly when using `Speedometer` 
and `LogMetricsCallback` at the same time? Both speedometer and tensorboard 
logging.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] zihaolucky commented on a change in pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
zihaolucky commented on a change in pull request #7363: Add tensorboard 
configure into ./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363#discussion_r131629394
 
 

 ##
 File path: example/image-classification/common/fit.py
 ##
 @@ -168,10 +168,16 @@ def fit(args, network, data_loader, **kwargs):
 
 # callbacks that run after each batch
 batch_end_callbacks = [mx.callback.Speedometer(args.batch_size, 
args.disp_batches)]
+eval_end_callbacks = []
 if 'batch_end_callback' in kwargs:
 cbs = kwargs['batch_end_callback']
 batch_end_callbacks += cbs if isinstance(cbs, list) else [cbs]
 
 Review comment:
   Have you verified if the logging works correctly when using `Speedometer` 
and `LogMetricsCallback` at the same time? Both speedometer and tensorboard 
logging.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] alues closed pull request #7309: Update Install script

2017-08-07 Thread git
alues closed pull request #7309: Update Install script
URL: https://github.com/apache/incubator-mxnet/pull/7309
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] train-test-laura opened a new issue #7364: MxnetR chunk-wise neural nets

2017-08-07 Thread git
train-test-laura opened a new issue #7364: MxnetR chunk-wise neural nets
URL: https://github.com/apache/incubator-mxnet/issues/7364
 
 
   Dear all,
   
   I just now started using the mxnet R package in Windows. 
   
   I have a pretty big dataset which I need to process in chunks due to memory 
limits. Therefore, I split my dataset and wanted to run a feed-forward  neural 
net on chunk 1, and use the parameters (weights and bias) for chunk 2 , which 
in turn can be used for chunk 3, and so on. However, despite some examples 
[](https://statist-bhfz.github.io/cats_dogs_finetune) I cannot get that to work.
   
   My model looks like that:
   `## set up neural network
   data <- mx.symbol.Variable("data")
   fc1 <- mx.symbol.FullyConnected(data, name="fc1", num_hidden=150)
   act1 <- mx.symbol.Activation(fc1, name="relu1", act_type="relu")
   fc2 <- mx.symbol.FullyConnected(act1, name="fc2", num_hidden=100)
   softmax <- mx.symbol.SoftmaxOutput(fc2, name="sm")
   
   prefix='Checkpoints/chkpt'
   ## train!
   system.time(model <- mx.model.FeedForward.create(softmax, X=train.x, 
y=train.y,
ctx=devices, num.round=20, 
array.batch.size=200,
learning.rate=0.09, 
momentum=0.9,  eval.metric=mx.metric.accuracy,
optimizer='sgd', 

epoch.end.callback=mx.callback.save.checkpoint(prefix),

batch.end.callback=mx.callback.log.speedometer(200, frequency = 200)))
   
   `
   and now I tried to follow other posts and used 
   net001<- mx.model.load(prefix, iteration=20)
   
   symbol<- net001$symbol
   internals<- symbol$get.internals()
   outputs<- internals$outputs
   
   arg_params_batch1<- net001$arg.params
   fc1_weights_batch1<- arg_params_batch1[["fc1_weight"]]
   fc2_weights_batch1<- arg_params_batch1i[["fc2_weight"]]
   
   But now I am unsure how to use the weights and bias for the next batch of 
mx.model.FeedForward.create. 
   Any hint would be greatly appreciated.
   Thank you,
   Best, Laura
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] ysh329 opened a new pull request #7363: Add tensorboard configure into ./common/fit.py and ./train_mnist.py

2017-08-07 Thread git
ysh329 opened a new pull request #7363: Add tensorboard configure into 
./common/fit.py and ./train_mnist.py
URL: https://github.com/apache/incubator-mxnet/pull/7363
 
 
   Some users, including me, are confused about tensorboard usage, which after 
making tensorboard enable, it only draws accuracy curve of training set, not 
containing accuracy curve of evaluation set.
   
   Besides, the pip of tensorboard for MXNet pip is still in construction, 
after finishing, we'll add these parameters (`train_log`, `eval_log`) into args 
of parser.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] tianhaijie closed issue #7360: I checkout to MXNet@(commit 62ecb60),then compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile successfully!!

2017-08-07 Thread git
tianhaijie closed issue #7360: I checkout to MXNet@(commit 62ecb60),then 
compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile 
successfully!!
URL: https://github.com/apache/incubator-mxnet/issues/7360
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] tianhaijie commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile successfully!!

2017-08-07 Thread git
tianhaijie commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then 
compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile 
successfully!!
URL: 
https://github.com/apache/incubator-mxnet/issues/7360#issuecomment-320594567
 
 
   @edmBernard Yeah,it's help for me!
   cool!!Thanks!
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] solalm commented on issue #7219: [R] How to include a minimum function in MakeLoss

2017-08-07 Thread git
solalm commented on issue #7219: [R] How to include a minimum function in 
MakeLoss
URL: 
https://github.com/apache/incubator-mxnet/issues/7219#issuecomment-320593072
 
 
   Thank you!
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] edmBernard commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile successfully!!

2017-08-07 Thread git
edmBernard commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then 
compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile 
successfully!!
URL: 
https://github.com/apache/incubator-mxnet/issues/7360#issuecomment-320592697
 
 
   Mxnet change Cub repository from NVLab to dmlc because there is a size issue 
on official history. 
   now cub -> dmlc/cub
   before cub -> NVLAB/cub
   when you clone you are on  dmlc/cub repository. if you try to checkout to 
89de7ab this hash don't exist on the dmlc/cub repository. It's a hash from 
NVLAB/cub so it fail.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] tianhaijie commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile successfully!!

2017-08-07 Thread git
tianhaijie commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then 
compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile 
successfully!!
URL: 
https://github.com/apache/incubator-mxnet/issues/7360#issuecomment-320589753
 
 
   @edmBernard Thank you for your attention!!I find a solution at 
stackoverflow,now,it seems everything is ok now The main reason for this 
problem is that i cannot fully understand what git submodule do...Anyway,thanks 
again!!
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] stmatengss opened a new issue #7362: import mxnet errors

2017-08-07 Thread git
stmatengss opened a new issue #7362: import mxnet errors
URL: https://github.com/apache/incubator-mxnet/issues/7362
 
 
   ## Description
   If I use pip(which is provided by OS, is not the version through get-pip.py 
script) to install mxnet, there are some errors occur when I run "import mxnet 
as mx".
   
   ## Environment info
   Operating System:
   Ubuntu 14.04 
   
   Compiler:
   gcc 4.8.4
   
   Package used (Python/R/Scala/Julia):
   Python
   
   MXNet version:
   0.10.0.post2
   
   MXNet commit hash (`git rev-parse HEAD`):
   
   Python version and distribution:
   python 2.7
   
   
   ## Error Message:
   
   ---  
   
   OSError   Traceback (most recent call last)  
   
in () 
   
   > 1 import mxnet as mx   
   

   
   /usr/local/lib/python2.7/dist-packages/mxnet/__init__.py in ()   
   
 5  
   
 6 from .context import Context, current_context, cpu, gpu  
   
   > 7 from .base import MXNetError 
   
 8 from . import base   
   
 9 from . import contrib
   

   
   /usr/local/lib/python2.7/dist-packages/mxnet/base.py in ()   
   
50 __version__ = libinfo.__version__
   
51 # library instance of mxnet  
   
   ---> 52 _LIB = _load_lib()   
   
53  
   
54 # type definitions   
   

   
   /usr/local/lib/python2.7/dist-packages/mxnet/base.py in _load_lib()  
   
42 """Load libary by searching possible path."""
   
43 lib_path = libinfo.find_lib_path()   
   
   ---> 44 lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_GLOBAL)   
   
45 # DMatrix functions  
   
46 lib.MXGetLastError.restype = ctypes.c_char_p 
   

   
   /usr/lib/python2.7/ctypes/__init__.pyc in __init__(self, name, mode, handle, 
use_errno, use_last_error) 
   363  
   
   364 if handle is None:   
   
   --> 365 self._handle = _dlopen(self._name, mode) 
   
   366 else:
   
   367 self._handle = handle
   

   
   OSError: /usr/local/lib/python2.7/dist-packages/mxnet/libmxnet.so: invalid 
ELF header   
   
   
   ## Minimum reproducible example
   I don't use `wget https://bootstrap.pypa.io/get-pip.py && sudo python 
get-pip.py`, and I directly use the pip which provided by OS. The pip version 
is `pip-1.5.4`.
   
   
   ## Steps to reproduce
   or if you are running standard examples, please provide the commands you 
have run that lead to the error.
   
   1.
   2.
   3.
   
   ## What have you tried to solve it?
   
   1.
   2.
   3.
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please 

[GitHub] edmBernard commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile successfully!!

2017-08-07 Thread git
edmBernard commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then 
compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile 
successfully!!
URL: 
https://github.com/apache/incubator-mxnet/issues/7360#issuecomment-320586804
 
 
   yeah try the method in this issue : 
https://github.com/apache/incubator-mxnet/issues/6891.
   that allow to correctly ckeckout before the cub change 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] tianhaijie commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile successfully!!

2017-08-07 Thread git
tianhaijie commented on issue #7360: I checkout to MXNet@(commit 62ecb60),then 
compile mxnet error,but when i dont checkout to MXNet@(commit 62ecb60),compile 
successfully!!
URL: 
https://github.com/apache/incubator-mxnet/issues/7360#issuecomment-320584501
 
 
Hi, @edmBernard  Actually,when i use git checkout 62ecb60,i got
   Mcub
   Mdmlc-core
   Mmshadow
   Mnnvm
   HEAD is now at 62ecb60... Add 'argnum' for autograd (#5787)
   it seems that mxnet is at 62ecb60 
   Then i use git submodule update,i got
   fatal: reference is not a tree: 89de7ab20167909bc2c4f8acd397671c47cf3c0d
   Unable to checkout '89de7ab20167909bc2c4f8acd397671c47cf3c0d' in submodule 
path 'cub'
   it seems git submodule update doesn't work!And I think the problem might be 
here
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] jeremiedb opened a new issue #5488: [WIP] RNN with bucketing and mask - R package

2017-08-07 Thread git
jeremiedb opened a new issue #5488: [WIP] RNN with bucketing and mask - R 
package
URL: https://github.com/apache/incubator-mxnet/issues/5488
 
 
   Since there wasn't an API yet for bucketing and masking in the R-package, I 
started building some functionnalities to address this. Inference from iterator 
is also provided. Further work remains to render the interface more flexible to 
different structures (seq-to-seq vs. seq-to-single used to demo). I've tried to 
stay as close as possible to the current `model.R` for standard feedforward 
training. 
   
   I've detailed the approach and put the code here: 
   https://github.com/jeremiedb/mxnet_R_bucketing
   
   I was wondering if there were already plans to develop bucketing utilities 
in the R package. If not, would you see this approach as a decent one it and 
worth buildind further on it?
   
   There are some specificities with how I dealt with the iterarators, it 
assumes that a pre-processing is performed to put the data and label arrays in 
lists for each bucket. Also noticed that shared module options seems not 
supported in the `symbol_bind` operator, not sure if this may result in memory 
management issues. 
   
   In any case I can turn it into an example to add to the docs. CNN examples 
reaches 89% accuracy on IMDB sentiment in few minutes on laptop CPU. 
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha commented on issue #7358: fix build

2017-08-07 Thread git
szha commented on issue #7358: fix build
URL: https://github.com/apache/incubator-mxnet/pull/7358#issuecomment-320580751
 
 
   I wasn't able to figure out the caffe converter error yet. It succeeds for 
the googlenet but fails for vgg16 and resnet50.
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated (b0c8c6c -> 2f257e8)

2017-08-07 Thread jxie
This is an automated email from the ASF dual-hosted git repository.

jxie pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git.


from b0c8c6c  [Perl] Fix for CI (#7343)
 add 2f257e8  fix build (#7358)

No new revisions were added by this update.

Summary of changes:
 scala-package/core/src/test/scala/ml/dmlc/mxnet/OperatorSuite.scala | 2 +-
 tests/python/gpu/test_operator_gpu.py   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"comm...@mxnet.apache.org" '].


[GitHub] piiswrong commented on a change in pull request #7356: decouple record/train and add state readers

2017-08-07 Thread git
piiswrong commented on a change in pull request #7356: decouple record/train 
and add state readers
URL: https://github.com/apache/incubator-mxnet/pull/7356#discussion_r131579066
 
 

 ##
 File path: python/mxnet/autograd.py
 ##
 @@ -54,26 +76,28 @@ class RecordingStateScope(object):
 y = model(x)
 backward([y])
 """
-def __init__(self, enter_state, is_train):
-self._enter_state = enter_state
+def __init__(self, is_record, is_train):
+self._enter_is_record = is_record
 self._enter_is_train = is_train
-self._prev = None
+self._prev_is_record = None
 self._prev_is_train = None
 
 def __enter__(self):
-self._prev = set_recording(self._enter_state)
-self._prev_is_train = set_training(self._enter_is_train)
+if self._enter_is_record is not None:
 
 Review comment:
   revert for now
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7356: decouple record/train and add state readers

2017-08-07 Thread git
piiswrong commented on a change in pull request #7356: decouple record/train 
and add state readers
URL: https://github.com/apache/incubator-mxnet/pull/7356#discussion_r131579089
 
 

 ##
 File path: python/mxnet/autograd.py
 ##
 @@ -45,6 +45,28 @@ def set_training(is_train):
 ctypes.c_int(is_train), ctypes.byref(prev)))
 return bool(prev.value)
 
+def is_recording():
+"""Get status on recording/not recording.
+
+Returns
+---
+Current state of recording.
+"""
+curr = ctypes.c_bool()
+check_call(_LIB.MXAutogradIsRecording(ctypes.byref(curr)))
+return curr.value
+
+def is_training():
+"""Get status on training/not training.
+
+Returns
+---
+Current state of training/inference.
+"""
+curr = ctypes.c_bool()
+check_call(_LIB.MXAutogradIsTraining(ctypes.byref(curr)))
+return curr.value
+
 
 class RecordingStateScope(object):
 
 Review comment:
   we should probably hide this with _
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] piiswrong commented on a change in pull request #7356: decouple record/train and add state readers

2017-08-07 Thread git
piiswrong commented on a change in pull request #7356: decouple record/train 
and add state readers
URL: https://github.com/apache/incubator-mxnet/pull/7356#discussion_r131579043
 
 

 ##
 File path: python/mxnet/autograd.py
 ##
 @@ -112,6 +137,34 @@ def pause(is_train=False):
 return RecordingStateScope(False, is_train)
 
 
+def override_train():
 
 Review comment:
   set_training is enough for now. We can add train()/predict() after getting 
more user feedback
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


  1   2   >