update doc of minddata
This commit is contained in:
parent
a5e4b75e00
commit
7d8da77c6c
|
@ -181,9 +181,9 @@ enum class SamplingStrategy {
|
|||
|
||||
/// \brief Possible values for output format in get all neighbors function of gnn dataset
|
||||
enum class OutputFormat {
|
||||
kNormal = 0, ///< Normal format>
|
||||
kCoo = 1, ///< COO format>
|
||||
kCsr = 2 ///< CSR format>
|
||||
kNormal = 0, ///< Normal format.
|
||||
kCoo = 1, ///< COO format.
|
||||
kCsr = 2 ///< CSR format.
|
||||
};
|
||||
|
||||
// convenience functions for 32bit int bitmask
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -89,11 +89,13 @@ class Iterator {
|
|||
/// \brief Function to shut down the data pipeline.
|
||||
void Stop();
|
||||
|
||||
/// \brief Inter class as iterator of Iterator.
|
||||
class _Iterator {
|
||||
public:
|
||||
/// \brief Constructor
|
||||
explicit _Iterator(Iterator *lt);
|
||||
|
||||
// Destructor
|
||||
/// \brief Destructor
|
||||
~_Iterator() {
|
||||
if (cur_row_ != nullptr) {
|
||||
delete cur_row_;
|
||||
|
@ -101,10 +103,16 @@ class Iterator {
|
|||
}
|
||||
}
|
||||
|
||||
_Iterator &operator++(); // prefix ++ overload
|
||||
MSTensorMap &operator*() { return *cur_row_; } // dereference operator
|
||||
/// \brief prefix ++ overload
|
||||
_Iterator &operator++();
|
||||
|
||||
/// \brief dereference operator
|
||||
MSTensorMap &operator*() { return *cur_row_; }
|
||||
|
||||
/// \brief dereference operator
|
||||
MSTensorMap *operator->() { return cur_row_; }
|
||||
|
||||
/// \brief bool operator
|
||||
bool operator!=(const _Iterator &rhs) { return cur_row_ != rhs.cur_row_; }
|
||||
|
||||
private:
|
||||
|
@ -113,8 +121,10 @@ class Iterator {
|
|||
MSTensorMap *cur_row_;
|
||||
};
|
||||
|
||||
/// \brief Function to return the iterator points to the begin of Iterator.
|
||||
_Iterator begin() { return _Iterator(this); }
|
||||
|
||||
/// \brief Function to return the iterator points to the end of Iterator.
|
||||
_Iterator end() { return _Iterator(nullptr); }
|
||||
|
||||
private:
|
||||
|
@ -137,8 +147,7 @@ class PullIterator : public Iterator {
|
|||
Status GetNextRow(MSTensorVec *const row) override;
|
||||
|
||||
/// \brief Function to get specified rows from the data pipeline.
|
||||
/// \note Type of return data is a vector(without column name).
|
||||
/// \note This behavior is subject to change.
|
||||
/// \note Type of return data is a vector(without column name). This behavior is subject to change.
|
||||
/// \param[in] num_rows The number of rows to fetch.
|
||||
/// \param[out] row The output tensor row.
|
||||
/// \return Status error code, returns OK if no error encountered else false.
|
||||
|
|
|
@ -331,7 +331,7 @@ class RandomColor final : public TensorTransform {
|
|||
public:
|
||||
/// \brief Constructor.
|
||||
/// \param[in] t_lb Lower bound random weights.
|
||||
/// \param[in] t_lb Upper bound random weights.
|
||||
/// \param[in] t_ub Upper bound random weights.
|
||||
explicit RandomColor(float t_lb, float t_ub);
|
||||
|
||||
/// \brief Destructor.
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
# ==============================================================================
|
||||
"""
|
||||
This module is to support audio augmentations.
|
||||
It includes two parts: transforms and utils.
|
||||
transforms is a high performance processing module with common audio operations.
|
||||
utils provides some general methods for audio processing.
|
||||
"""
|
||||
from . import transforms
|
||||
from . import utils
|
||||
|
|
|
@ -262,7 +262,7 @@ def get_monitor_sampling_interval():
|
|||
Examples:
|
||||
>>> # Get the global configuration of monitor sampling interval.
|
||||
>>> # If set_monitor_sampling_interval() is never called before, the default value(1000) will be returned.
|
||||
>>> ds.config.get_monitor_sampling_interval()
|
||||
>>> sampling_interval = ds.config.get_monitor_sampling_interval()
|
||||
"""
|
||||
return _config.get_monitor_sampling_interval()
|
||||
|
||||
|
@ -362,7 +362,7 @@ def get_callback_timeout():
|
|||
Examples:
|
||||
>>> # Get the global configuration of callback timeout.
|
||||
>>> # If set_callback_timeout() is never called before, the default value(60) will be returned.
|
||||
>>> ds.config.get_callback_timeout()
|
||||
>>> callback_timeout = ds.config.get_callback_timeout()
|
||||
"""
|
||||
return _config.get_callback_timeout()
|
||||
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Copyright 2021 Huawei Technologies Co., Ltd
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ==============================================================================
|
||||
"""init file for MindData utils"""
|
||||
from .browse_dataset import imshow_det_bbox
|
||||
|
||||
__all__ = ["imshow_det_bbox"]
|
|
@ -717,7 +717,7 @@ def export(net, *inputs, file_name, file_format='AIR', **kwargs):
|
|||
- enc_key (byte): Byte type key used for encryption. Tha valid length is 16, 24, or 32.
|
||||
- enc_mode (str): Specifies the encryption mode, take effect when enc_key is set.
|
||||
Option: 'AES-GCM' | 'AES-CBC'. Default: 'AES-GCM'.
|
||||
- dataset (str): Specifies the preprocess methods of network.
|
||||
- dataset (Dataset): Specifies the preprocess methods of network.
|
||||
|
||||
Examples:
|
||||
>>> import numpy as np
|
||||
|
|
Loading…
Reference in New Issue