Skip to content

Commit

Permalink
mxnet plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
lanpa committed Aug 29, 2017
1 parent 2c22da3 commit dbc5d78
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tensorboardX/x2num.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ def makenp(x, modality=None):
if 'torch' in str(type(x)):
return pytorch_np(x, modality)

if 'mxnet' in str(type(x)):
return mxnet_np(x, modality)

def pytorch_np(x, modality):
import torch
if isinstance(x, torch.autograd.variable.Variable):
Expand All @@ -34,8 +37,9 @@ def theano_np(x):
def caffe2_np(x):
pass

def mxnet_np(x):
pass
def mxnet_np(x, modality):
return x.asnumpy()


def chainer_np(x):
import chainer
Expand Down

0 comments on commit dbc5d78

Please sign in to comment.