Skip to content

Commit

Permalink
fix isinstance() validation in pytorch
Browse files Browse the repository at this point in the history
  • Loading branch information
lyakaap committed Feb 8, 2018
1 parent 9cbfca8 commit c5189bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tensorboardX/x2num.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def makenp(x, modality=None):

def pytorch_np(x, modality):
import torch
if isinstance(x, torch.autograd.variable.Variable):
if isinstance(x, torch.autograd.Variable):
x = x.data
x = x.cpu().numpy()
if modality == 'IMG':
Expand Down

0 comments on commit c5189bd

Please sign in to comment.