(self, list_like)
Convert list-like containers to list
Convert list-like containers to list
Convert list - like containers to list
def to_list(self, list_like):
        """Convert list-like containers to list"""
        if isinstance(list_like, list):
            return list_like

        if isinstance(list_like, Variable):
            return list(to_tensor(list_like).numpy())
        elif isinstance(list_like, Tensor):
            return list(list_like.numpy())
def to_list ( self , list_like ) : if isinstance ( list_like , list ) : return list_like if isinstance ( list_like , Variable ) : return list ( to_tensor ( list_like ) . numpy ( ) ) elif isinstance ( list_like , Tensor ) : return list ( list_like . numpy ( ) )