Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Fix example for mxnet.nd.contrib.cond and fix typo in src/engine (#12954
Browse files Browse the repository at this point in the history
)

* fix typo in src/engine

* fix example for mx.nd.contrib.cond
  • Loading branch information
wkcn authored and nswamy committed Nov 4, 2018
1 parent f5cef48 commit 974a04c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions python/mxnet/ndarray/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ def cond(pred, then_func, else_func):
--------
>>> a, b = mx.nd.array([1]), mx.nd.array([2])
>>> pred = a * b < 5
>>> then_func = lambda a, b: (a + 5) * (b + 5)
>>> else_func = lambda a, b: (a - 5) * (b - 5)
>>> then_func = lambda: (a + 5) * (b + 5)
>>> else_func = lambda: (a - 5) * (b - 5)
>>> outputs = mx.nd.contrib.cond(pred, then_func, else_func)
>>> outputs[0]
[42.]
Expand Down
2 changes: 1 addition & 1 deletion src/engine/engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ inline Engine* CreateEngine() {
ret = CreateNaiveEngine();
#endif

if (ret ==nullptr) {
if (ret == nullptr) {
LOG(FATAL) << "Cannot find Engine " << type;
}
if (!default_engine) {
Expand Down
2 changes: 1 addition & 1 deletion src/engine/threaded_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class ThreadedVar final
private:
// TODO(hotpxl) change this to spinlock for faster runtime
// TODO(hotpxl) consider rename head
/*! \brief inetrnal mutex of the ThreadedVar */
/*! \brief internal mutex of the ThreadedVar */
std::mutex mutex_;
/*!
* \brief number of pending reads operation in the variable.
Expand Down

0 comments on commit 974a04c

Please sign in to comment.