This is an automated email from the ASF dual-hosted git repository.
moreau pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 4c4d3dc Fix tutorial broken by Docker build (#6694)
4c4d3dc is described below
commit 4c4d3dc2d8723a5b78d34f1bb0540ef66ee185a3
Author: Jared Roesch <[email protected]>
AuthorDate: Thu Oct 15 22:27:11 2020 -0700
Fix tutorial broken by Docker build (#6694)
---
tutorials/frontend/build_gcn.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tutorials/frontend/build_gcn.py b/tutorials/frontend/build_gcn.py
index 5c571ef..b832d18 100644
--- a/tutorials/frontend/build_gcn.py
+++ b/tutorials/frontend/build_gcn.py
@@ -242,7 +242,9 @@ import networkx as nx
def prepare_params(g, data):
params = {}
- params["infeats"] = data.features.astype("float32") # Only support
float32 as feature for now
+ params["infeats"] = data.features.numpy().astype(
+ "float32"
+ ) # Only support float32 as feature for now
# Generate adjacency matrix
adjacency = nx.to_scipy_sparse_matrix(g)
@@ -350,5 +352,7 @@ test_mask = data.test_mask
acc = evaluate(data, logits_tvm)
print("Test accuracy of TVM results: {:.2%}".format(acc))
+import tvm.testing
+
# Verify the results with the DGL model
tvm.testing.assert_allclose(logits_torch, logits_tvm, atol=1e-3)