Open GZHoffie opened 3 years ago
Resolved by collecting the sampled
array of shape (1, 60, 57)
to form a np.array
of shape (4, 60, 57)
or larger, so that no shard is empty. (The XShards.partition
splits the array into 4 parts in my case)
Resolved by collecting the
sampled
array of shape(1, 60, 57)
to form anp.array
of shape(4, 60, 57)
or larger, so that no shard is empty. (TheXShards.partition
splits the array into 4 parts in my case)
Shall we check and skip empty shards? @jenniew
Yes, we shall need to check empty shards in TFRunner.
I wanted to use a
tf2.Estimator
in a LSTM network. The network looks like the followingThe input (
x
) of this network is of shape(1, 60, 57)
, where each of the 60 arrays are one-hot arrays indicating which character is present. and the output of the network is a(1, 57)
sofmax array that shows the probability of each of the 57 characters being the next character. The output is compared with a(1, 57)
one-hot array for training.And my
Estimator
is built as the followingThe
Estimator
works fine when training on my training set.However, when it comes to prediction, I used a
np.array
calledsampled
of shape(1, 60, 57)
where again, the 60 arrays are one-hot arrays. I transformed it intoXShards
and made predictions usingBut it is not working, and reports the following error.
For the code and all the error message, you can refer to this notebook. What might be the problem? Thank you!