Skip to content

Commit

Permalink
Remove outdated references to relay.backend.interpreter.TensorValue (#56
Browse files Browse the repository at this point in the history
)
  • Loading branch information
slyubomirsky authored Jan 17, 2020
1 parent 372b3fa commit 71547ea
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion experiments/char_rnn/relay_rnn/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions experiments/char_rnn/relay_rnn/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions experiments/treelstm/relay_tlstm/converter.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion experiments/treelstm/relay_tlstm/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 71547ea

Please sign in to comment.