Section5 Tf

chapter2hf-notebooksjacourse

複数系列の処理 (TensorFlow)

Install the Transformers, Datasets, and Evaluate libraries to run this notebook.

[ ]
[ ]
InvalidArgumentError: Input to reshape is a tensor with 14 values, but the requested shape has 196 [Op:Reshape]
[ ]
<tf.Tensor: shape=(1, 16), dtype=int32, numpy=
,array([[  101,  1045,  1005,  2310,  2042,  3403,  2005,  1037, 17662,
,        12172,  2607,  2026,  2878,  2166,  1012,   102]], dtype=int32)>
[ ]
Input IDs: tf.Tensor(
,[[ 1045  1005  2310  2042  3403  2005  1037 17662 12172  2607  2026  2878
,   2166  1012]], shape=(1, 14), dtype=int32)
,Logits: tf.Tensor([[-2.7276208  2.8789377]], shape=(1, 2), dtype=float32)
[ ]
[ ]
[ ]
tf.Tensor([[ 1.5693678 -1.3894581]], shape=(1, 2), dtype=float32)
,tf.Tensor([[ 0.5803005  -0.41252428]], shape=(1, 2), dtype=float32)
,tf.Tensor(
,[[ 1.5693681 -1.3894582]
, [ 1.3373486 -1.2163193]], shape=(2, 2), dtype=float32)
[ ]
tf.Tensor(
,[[ 1.5693681  -1.3894582 ]
, [ 0.5803021  -0.41252586]], shape=(2, 2), dtype=float32)
[ ]