!19351 [MD] fix api doc

Merge pull request !19351 from liyong126/fix_doc
This commit is contained in:
i-robot 2021-07-05 07:06:45 +00:00 committed by Gitee
commit d335c6722e
1 changed files with 2 additions and 9 deletions

View File

@ -70,17 +70,10 @@ class TFRecordToMR:
Args:
source (str): the TFRecord file to be transformed.
destination (str): the MindRecord file path to transform into.
feature_dict (dict): a dictionary that states the feature type,
feature_dict (dict): a dictionary that states the feature type, and
`VarLenFeature` is not supported.
bytes_fields (list, optional): the bytes fields which are in `feature_dict` and can be images bytes.
Examples:
>>> feature_dict = {"xxxx": tf.io.FixedLenFeature([], tf.string),
... "yyyy": tf.io.FixedLenFeature([], tf.int64)}
>>> # Follow case which uses VarLenFeature is not supported.
>>> feature_dict = {"context": {"xxxx": tf.io.FixedLenFeature([], tf.string),
... "yyyy": tf.io.VarLenFeature(tf.int64)},
... "sequence": {"zzzz": tf.io.FixedLenSequenceFeature([], tf.float32)}}
Raises:
ValueError: If parameter is invalid.
Exception: when tensorflow module is not found or version is not correct.