From 2d7f00bcfd4b0a42982dbe7bf5927cf275d4a465 Mon Sep 17 00:00:00 2001 From: liyong Date: Mon, 5 Jul 2021 09:54:10 +0800 Subject: [PATCH] fix api doc --- mindspore/mindrecord/tools/tfrecord_to_mr.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/mindspore/mindrecord/tools/tfrecord_to_mr.py b/mindspore/mindrecord/tools/tfrecord_to_mr.py index 3f1917a6fdd..86713a4546c 100644 --- a/mindspore/mindrecord/tools/tfrecord_to_mr.py +++ b/mindspore/mindrecord/tools/tfrecord_to_mr.py @@ -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.