def test_sequence_feature_not_supported(self):
feature_spec = {
# FixedLenSequenceFeatures
'fixed_seq_bool':
tf.FixedLenSequenceFeature(shape=[10], dtype=tf.bool),
'fixed_seq_bool_allow_missing':
tf.FixedLenSequenceFeature(
shape=[5], dtype=tf.bool, allow_missing=True),
'fixed_seq_int':
tf.FixedLenSequenceFeature(shape=[5], dtype=tf.int64),
'fixed_seq_float':
tf.FixedLenSequenceFeature(shape=[5], dtype=tf.float32),
'fixed_seq_string':
tf.FixedLenSequenceFeature(shape=[5], dtype=tf.string),
}
with self.assertRaisesRegexp(ValueError,
'DatasetSchema does not support '
'FixedLenSequenceFeature yet.'):
sch.from_feature_spec(feature_spec)
评论列表
文章目录