Fix infer type of kernel in dense. (#4125)
authorshoubhik <shoubhikbhatti@gmail.com>
Tue, 15 Oct 2019 21:02:08 +0000 (14:02 -0700)
committerZhi <5145158+zhiics@users.noreply.github.com>
Tue, 15 Oct 2019 21:02:08 +0000 (14:02 -0700)
commit11a3a777ec78ad81ce12a940d07521870f546ad1
tree9253960db986bd2168f7cc8c10e314112b715cab
parent4ee534ba5654dfaa73bbd58d058290631ac9c299
Fix infer type of kernel in dense. (#4125)

* Fix infer type of kernel in dense.

* - Moving the check of weight being nullptr up as it is needed in both the branches now.
- Adding test case for validating that data dtype and kernel dtypes can be different.

* - Fix the dtype check for weight. If the weight is not present then we will use the data dtype.
src/relay/op/nn/nn.h
tests/python/relay/test_op_level1.py