You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here you give the result of resnet18 with a set of 10 as input, which is consistent with tvm generated workload. However, when I want to use pytorch resnet18 to verify this output, I get a different answer. The code is as follows:
In addition, when I try to use your script tvm_generate_model.py to generate densenet model in NVIDIA CUDA, the output is all zeros by using the following sample:
batch_size = 1
image_shape = (3, 224, 224)
data_shape = (batch_size,) + image_shape
out_shape = (batch_size, num_class)
mod, params = relay.testing.densenet.get_workload(
densenet_size=169, batch_size=batch_size, image_shape=image_shape
)
opt_level = 3
target = tvm.target.cuda()
with tvm.transform.PassContext(opt_level=opt_level):
lib = relay.build(mod, target, params=params)
# graph_json, lib, params = relay.build(mod, target, params=params) // if I use this style, the code that immediately follows to get the module will report an error, indicating that the module has no function 'default'
graph_json = lib.graph_json
params = lib.get_params()
ctx = tvm.gpu()
module = graph_runtime.GraphModule(lib["default"](ctx))
data = np.ones(data_shape).astype("float32")
data = data * 10
module.set_input("data", data)
module.run()
out = module.get_output(0, tvm.nd.empty(out_shape)).asnumpy()
print(out.flatten()[0:10]) // [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
I would be very grateful if you could reply!
The text was updated successfully, but these errors were encountered:
Here you give the result of resnet18 with a set of 10 as input, which is consistent with tvm generated workload. However, when I want to use pytorch resnet18 to verify this output, I get a different answer. The code is as follows:
The model parameters used in the example are randomly generated by TVM, which are not from a trained model. See:
hello!
I'm trying to validate your example with pytorch, in which I get some problems.
reef/src/reef/test/test.cpp
Lines 52 to 53 in 0a25de5
Here you give the result of resnet18 with a set of 10 as input, which is consistent with tvm generated workload. However, when I want to use pytorch resnet18 to verify this output, I get a different answer. The code is as follows:
In addition, when I try to use your script
tvm_generate_model.py
to generate densenet model in NVIDIA CUDA, the output is all zeros by using the following sample:I would be very grateful if you could reply!
The text was updated successfully, but these errors were encountered: