コード例 #1
0
ファイル: activation.py プロジェクト: troyliu0105/mxdetection
 def hybrid_forward(self, F, x):
     sigmoid = F.npx.tanh if is_np_array() else F.tanh
     return sigmoid(x, name='fwd')
コード例 #2
0
ファイル: test_thread_local.py プロジェクト: MarkMa1990/mxnet
 def g():
     with mx.np_array(False):
         event.wait()
         if not mx.is_np_array():
             status[0] = True
コード例 #3
0
ファイル: activation.py プロジェクト: troyliu0105/mxdetection
 def hybrid_forward(self, F, x):
     relu = F.npx.relu if is_np_array() else F.relu
     return relu(x, name='fwd')