Browse Source

Fix comment errors

Add parameter verification
tags/v0.6.0-beta
heleiwang 5 years ago
parent
commit
bfecfc9f96
2 changed files with 4 additions and 3 deletions
  1. +3
    -3
      mindspore/dataset/engine/graphdata.py
  2. +1
    -0
      mindspore/dataset/engine/validators.py

+ 3
- 3
mindspore/dataset/engine/graphdata.py View File

@@ -192,7 +192,7 @@ class GraphData:


Args: Args:
node_list (list or numpy.ndarray): The given list of nodes. node_list (list or numpy.ndarray): The given list of nodes.
feature_types (list or ndarray): The given list of feature types.
feature_types (list or numpy.ndarray): The given list of feature types.


Returns: Returns:
numpy.ndarray: array of features. numpy.ndarray: array of features.
@@ -221,7 +221,7 @@ class GraphData:


Args: Args:
edge_list (list or numpy.ndarray): The given list of edges. edge_list (list or numpy.ndarray): The given list of edges.
feature_types (list or ndarray): The given list of feature types.
feature_types (list or numpy.ndarray): The given list of feature types.


Returns: Returns:
numpy.ndarray: array of features. numpy.ndarray: array of features.
@@ -249,7 +249,7 @@ class GraphData:
the feature information of nodes, the number of edges, the type of edges, and the feature information of edges. the feature information of nodes, the number of edges, the type of edges, and the feature information of edges.


Returns: Returns:
Dict: Meta information of the graph. The key is node_type, edge_type, node_num, edge_num,
dict: Meta information of the graph. The key is node_type, edge_type, node_num, edge_num,
node_feature_type and edge_feature_type. node_feature_type and edge_feature_type.
""" """
return self._graph.graph_info() return self._graph.graph_info()


+ 1
- 0
mindspore/dataset/engine/validators.py View File

@@ -1013,6 +1013,7 @@ def check_gnn_random_walk(method):
type_check(step_home_param, (float,), "step_home_param") type_check(step_home_param, (float,), "step_home_param")
type_check(step_away_param, (float,), "step_away_param") type_check(step_away_param, (float,), "step_away_param")
type_check(default_node, (int,), "default_node") type_check(default_node, (int,), "default_node")
check_value(default_node, (-1, INT32_MAX), "default_node")


return method(self, *args, **kwargs) return method(self, *args, **kwargs)




Loading…
Cancel
Save