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 is my input to the keras preprocessing StringLookup layer: <tf.Tensor 'args_4:0' shape=(None,) dtype=string> and it returns: <tf.Tensor 'string_lookup_1/Squeeze:0' shape=() dtype=int64>. The code snippet is as follows:
index=layers.StringLookup(
vocabulary=vocabulary, mask_token=None, num_oov_indices=1, output_mode="int"
)
# Convert the string input values into integer indices.value_index=index(feature_name)
Question 1: Isn't the output shape supposed to maintain the same shape = (None,) instead of shape = (). None is a batch dimension for tf.data.Dataset elements.
Question 2: How do I perform matmul in Keras so it runs on tensorflow, jax and torch? The following only runs on tensorflow, but fails on others. Where x=<tf.Tensor 'stack:0' shape=(None, 40, 16) dtype=float32> and v=<tf.Tensor 'ExpandDims_7:0' shape=(None, 40, 1) dtype=float32>. The output shape should be shape = (None, 16) and this are Symbolic tensors.
Here is my input to the keras preprocessing
StringLookup
layer:<tf.Tensor 'args_4:0' shape=(None,) dtype=string>
and it returns:<tf.Tensor 'string_lookup_1/Squeeze:0' shape=() dtype=int64>
. The code snippet is as follows:Question 1: Isn't the output shape supposed to maintain the same
shape = (None,)
instead ofshape = ()
.None
is a batch dimension fortf.data.Dataset
elements.Question 2: How do I perform
matmul
in Keras so it runs ontensorflow
,jax
andtorch
? The following only runs ontensorflow
, but fails on others. Wherex=<tf.Tensor 'stack:0' shape=(None, 40, 16) dtype=float32>
andv=<tf.Tensor 'ExpandDims_7:0' shape=(None, 40, 1) dtype=float32>
. The output shape should beshape = (None, 16)
and this areSymbolic
tensors.jax error:
torch error:
The text was updated successfully, but these errors were encountered: