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

Fix example for mxnet.nd.contrib.cond and fix typo in src/engine #12954

Merged
merged 2 commits into from
Nov 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/mxnet/ndarray/contrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,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