I have a dataset of tf.RaggedTensors with strings representing hexadecimal numbers that look like this:
[
[[b'F6EE', b'BFED', b'4EEA', b'00EE', b'77AE', b'1FBE', b'1A6E',
b'5AEB', b'6A0E', b'212F'],
...
[b'FFEE', b'FFED', b'FEED', b'FDEE', b'FAAE', b'FFBE', b'FA8E',
b'FAEB', b'FA0E', b'E12F']],
...
[[b'FFEE', b'FFED', b'FEED', b'FDEE', b'FAAE', b'FFBE', b'FA8E',
b'FAEB', b'FA0E', b'E12F'],
...
[b'B6EE', b'BFED', b'4EEA', b'00EE', b'77AE', b'1FBE', b'1A6E',
b'5AEB', b'6A0E', b'212F']]
]
I want to convert it into Tensor of int values, but tf.strings.to_number(tensor, tf.int32) doesn't have an option to specify the base as base16. Are there any alternatives?
Dataset contains tf.RaggedTensors, but the target shape is (batch_size, 100, 10). I guess this could be helpful if we were to make a custom function for this.