def as_feature_spec(self, column):
if column.domain.dtype not in _TF_EXAMPLE_ALLOWED_TYPES:
raise ValueError('tf.Example parser supports only types {}, so it is '
'invalid to generate a feature_spec with type '
'{}.'.format(
_TF_EXAMPLE_ALLOWED_TYPES,
repr(column.domain.dtype)))
return tf.VarLenFeature(column.domain.dtype)
评论列表
文章目录