Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api update] Remove outdated references to relay.backend.interpreter.TensorValue #56

Merged
merged 1 commit into from
Jan 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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