haoyang9804 commented on code in PR #15723:
URL: https://github.com/apache/tvm/pull/15723#discussion_r1321289332
##########
python/tvm/relay/frontend/keras.py:
##########
@@ -1053,22 +1053,30 @@ def _convert_simple_rnn(
in_data = inexpr[0]
prev_op = inexpr[1]
weightList = keras_layer.get_weights()
- kernel_weight = etab.new_const(weightList[0].transpose([1, 0]))
+ weightList0 = weightList[0].transpose([1, 0])
+ assert len(in_data.type_annotation.shape) == 3
+ for i in range(in_data.type_annotation.shape[1].value - 1):
+ weightList0 = np.hstack((weightList0, weightList[0].transpose([1, 0])))
Review Comment:
It's true that numpy.hstack does not support bfloat16. But weightList[0] and
weightList0 can never be bfloat16 to my best understanding. These two vars are
from weightList = keras_layer.get_weights(), and they are NumPy arrays. If
numpy does not support bfloat16, I think the dtype of weightList[0] should
never be bfloat16. So this worry seems unnecessary here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]