From 71547ea23078a67fb05422f26c3185ddb5f32230 Mon Sep 17 00:00:00 2001 From: "Steven S. Lyubomirsky" Date: Thu, 16 Jan 2020 17:10:43 -0800 Subject: [PATCH] Remove outdated references to relay.backend.interpreter.TensorValue (#56) --- experiments/char_rnn/relay_rnn/network.py | 1 - experiments/char_rnn/relay_rnn/util.py | 2 -- experiments/treelstm/relay_tlstm/converter.py | 4 ++-- experiments/treelstm/relay_tlstm/network.py | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/experiments/char_rnn/relay_rnn/network.py b/experiments/char_rnn/relay_rnn/network.py index f1dddf4..56c79ef 100644 --- a/experiments/char_rnn/relay_rnn/network.py +++ b/experiments/char_rnn/relay_rnn/network.py @@ -3,7 +3,6 @@ from tvm import relay from tvm.relay import op from tvm.relay import create_executor, Module -from tvm.relay.backend.interpreter import TensorValue from tvm.relay.prelude import Prelude import aot diff --git a/experiments/char_rnn/relay_rnn/util.py b/experiments/char_rnn/relay_rnn/util.py index 11a5142..b4476b0 100644 --- a/experiments/char_rnn/relay_rnn/util.py +++ b/experiments/char_rnn/relay_rnn/util.py @@ -42,8 +42,6 @@ def random_training_example(): target_line_tensor = targetTensor(line) return category_tensor, input_line_tensor, target_line_tensor -from tvm.relay.backend.interpreter import TensorValue - def sample(rnn, category, start_letter='A'): category_tensor = categoryTensor(category) input = inputTensor(start_letter) diff --git a/experiments/treelstm/relay_tlstm/converter.py b/experiments/treelstm/relay_tlstm/converter.py index 6b50d47..3d45a77 100644 --- a/experiments/treelstm/relay_tlstm/converter.py +++ b/experiments/treelstm/relay_tlstm/converter.py @@ -1,7 +1,7 @@ import torch import tvm from tvm import relay -from tvm.relay.backend.interpreter import Value, TupleValue, ConstructorValue, TensorValue +from tvm.relay.backend.interpreter import TupleValue, ConstructorValue from tvm.relay import testing, create_executor from tvm.relay.prelude import Prelude @@ -43,7 +43,7 @@ def from_list(p, l, t): # convert tensors def pytorch_to_relay(tensor): #print(tensor.shape) - return TensorValue(relay.const(tensor.detach().cpu().numpy().reshape((1, 300)), dtype='float32').data) + return relay.const(tensor.detach().cpu().numpy().reshape((1, 300)), dtype='float32').data def from_tree(p, rt, t): diff --git a/experiments/treelstm/relay_tlstm/network.py b/experiments/treelstm/relay_tlstm/network.py index 00de703..b1ef3a4 100644 --- a/experiments/treelstm/relay_tlstm/network.py +++ b/experiments/treelstm/relay_tlstm/network.py @@ -3,7 +3,6 @@ from tvm import relay from tvm.relay import op from tvm.relay import create_executor, Module -from tvm.relay.backend.interpreter import TensorValue from tvm.relay.prelude import Prelude from tvm.relay.testing import add_nat_definitions import aot