graphormer
mindnlp.transformers.models.graphormer.configuration_graphormer.GraphormerConfig
¶
Bases: PretrainedConfig
This is the configuration class to store the configuration of a [~GraphormerModel
]. It is used to instantiate an
Graphormer model according to the specified arguments, defining the model architecture. Instantiating a
configuration with the defaults will yield a similar configuration to that of the Graphormer
graphormer-base-pcqm4mv1 architecture.
Configuration objects inherit from [PretrainedConfig
] and can be used to control the model outputs. Read the
documentation from [PretrainedConfig
] for more information.
PARAMETER | DESCRIPTION |
---|---|
num_classes |
Number of target classes or labels, set to n for binary classification of n tasks.
TYPE:
|
num_atoms |
Number of node types in the graphs.
TYPE:
|
num_edges |
Number of edges types in the graph.
TYPE:
|
num_in_degree |
Number of in degrees types in the input graphs.
TYPE:
|
num_out_degree |
Number of out degrees types in the input graphs.
TYPE:
|
num_edge_dis |
Number of edge dis in the input graphs.
TYPE:
|
multi_hop_max_dist |
Maximum distance of multi hop edges between two nodes.
TYPE:
|
spatial_pos_max |
Maximum distance between nodes in the graph attention bias matrices, used during preprocessing and collation.
TYPE:
|
edge_type |
Type of edge relation chosen.
TYPE:
|
max_nodes |
Maximum number of nodes which can be parsed for the input graphs.
TYPE:
|
share_input_output_embed |
Shares the embedding layer between encoder and decoder - careful, True is not implemented.
TYPE:
|
num_layers |
Number of layers.
TYPE:
|
embedding_dim |
Dimension of the embedding layer in encoder.
TYPE:
|
ffn_embedding_dim |
Dimension of the "intermediate" (often named feed-forward) layer in encoder.
TYPE:
|
num_attention_heads |
Number of attention heads in the encoder.
TYPE:
|
self_attention |
Model is self attentive (False not implemented).
TYPE:
|
activation_function |
The non-linear activation function (function or string) in the encoder and pooler. If string,
TYPE:
|
dropout |
The dropout probability for all fully connected layers in the embeddings, encoder, and pooler.
TYPE:
|
attention_dropout |
The dropout probability for the attention weights.
TYPE:
|
activation_dropout |
The dropout probability for the activation of the linear transformer layer.
TYPE:
|
layerdrop |
The LayerDrop probability for the encoder. See the LayerDrop paper for more details.
TYPE:
|
bias |
Uses bias in the attention module - unsupported at the moment.
TYPE:
|
embed_scale(`float`, |
Scaling factor for the node embeddings.
TYPE:
|
num_trans_layers_to_freeze |
Number of transformer layers to freeze.
TYPE:
|
encoder_normalize_before |
Normalize features before encoding the graph.
TYPE:
|
pre_layernorm |
Apply layernorm before self attention and the feed forward network. Without this, post layernorm will be used.
TYPE:
|
apply_graphormer_init |
Apply a custom graphormer initialisation to the model before training.
TYPE:
|
freeze_embeddings |
Freeze the embedding layer, or train it along the model.
TYPE:
|
encoder_normalize_before |
Apply the layer norm before each encoder block.
TYPE:
|
q_noise |
Amount of quantization noise (see "Training with Quantization Noise for Extreme Model Compression"). (For more detail, see fairseq's documentation on quant_noise).
TYPE:
|
qn_block_size |
Size of the blocks for subsequent quantization with iPQ (see q_noise).
TYPE:
|
kdim |
Dimension of the key in the attention, if different from the other values.
TYPE:
|
vdim |
Dimension of the value in the attention, if different from the other values.
TYPE:
|
use_cache |
Whether or not the model should return the last key/values attentions (not used by all models).
TYPE:
|
traceable |
Changes return value of the encoder's inner_state to stacked tensors.
TYPE:
|
Example
>>> from transformers import GraphormerForGraphClassification, GraphormerConfig
...
>>> # Initializing a Graphormer graphormer-base-pcqm4mv2 style configuration
>>> configuration = GraphormerConfig()
...
>>> # Initializing a model from the graphormer-base-pcqm4mv1 style configuration
>>> model = GraphormerForGraphClassification(configuration)
...
>>> # Accessing the model configuration
>>> configuration = model.config
Source code in mindnlp/transformers/models/graphormer/configuration_graphormer.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
|
mindnlp.transformers.models.graphormer.configuration_graphormer.GraphormerConfig.__init__(num_classes=1, num_atoms=512 * 9, num_edges=512 * 3, num_in_degree=512, num_out_degree=512, num_spatial=512, num_edge_dis=128, multi_hop_max_dist=5, spatial_pos_max=1024, edge_type='multi_hop', max_nodes=512, share_input_output_embed=False, num_hidden_layers=12, embedding_dim=768, ffn_embedding_dim=768, num_attention_heads=32, dropout=0.1, attention_dropout=0.1, activation_dropout=0.1, layerdrop=0.0, encoder_normalize_before=False, pre_layernorm=False, apply_graphormer_init=False, activation_fn='gelu', embed_scale=None, freeze_embeddings=False, num_trans_layers_to_freeze=0, traceable=False, q_noise=0.0, qn_block_size=8, kdim=None, vdim=None, bias=True, self_attention=True, pad_token_id=0, bos_token_id=1, eos_token_id=2, **kwargs)
¶
Initialize a GraphormerConfig object with specified configuration parameters.
PARAMETER | DESCRIPTION |
---|---|
num_classes |
Number of classes for classification task.
TYPE:
|
num_atoms |
Number of atoms in the graph.
TYPE:
|
num_edges |
Number of edges in the graph.
TYPE:
|
num_in_degree |
Number of incoming degrees for each node.
TYPE:
|
num_out_degree |
Number of outgoing degrees for each node.
TYPE:
|
num_spatial |
Number of spatial features.
TYPE:
|
num_edge_dis |
Number of edge distances.
TYPE:
|
multi_hop_max_dist |
Maximum distance for multi-hop attention.
TYPE:
|
spatial_pos_max |
Maximum spatial position value.
TYPE:
|
edge_type |
Type of edges in the graph.
TYPE:
|
max_nodes |
Maximum number of nodes in the graph.
TYPE:
|
share_input_output_embed |
Flag to indicate sharing input and output embeddings.
TYPE:
|
num_hidden_layers |
Number of hidden layers.
TYPE:
|
embedding_dim |
Dimension of embeddings.
TYPE:
|
ffn_embedding_dim |
Dimension of feed-forward network embeddings.
TYPE:
|
num_attention_heads |
Number of attention heads.
TYPE:
|
dropout |
Dropout rate.
TYPE:
|
attention_dropout |
Dropout rate for attention layers.
TYPE:
|
activation_dropout |
Dropout rate for activation layers.
TYPE:
|
layerdrop |
Layer drop probability.
TYPE:
|
encoder_normalize_before |
Flag to normalize before encoder layers.
TYPE:
|
pre_layernorm |
Flag to apply pre-layer normalization.
TYPE:
|
apply_graphormer_init |
Flag to apply Graphormer initialization.
TYPE:
|
activation_fn |
Activation function to use.
TYPE:
|
embed_scale |
Scaling factor for embeddings.
TYPE:
|
freeze_embeddings |
Flag to freeze embeddings.
TYPE:
|
num_trans_layers_to_freeze |
Number of transformer layers to freeze.
TYPE:
|
traceable |
Flag for traceability.
TYPE:
|
q_noise |
Quantum noise level.
TYPE:
|
qn_block_size |
Quantum noise block size.
TYPE:
|
kdim |
Key dimension.
TYPE:
|
vdim |
Value dimension.
TYPE:
|
bias |
Flag to include bias terms.
TYPE:
|
self_attention |
Flag to use self-attention mechanism.
TYPE:
|
pad_token_id |
ID for padding token.
DEFAULT:
|
bos_token_id |
ID for beginning-of-sequence token.
DEFAULT:
|
eos_token_id |
ID for end-of-sequence token.
DEFAULT:
|
**kwargs |
Additional keyword arguments.
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
None. |
Source code in mindnlp/transformers/models/graphormer/configuration_graphormer.py
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 |
|
mindnlp.transformers.models.graphormer.collating_graphormer.GraphormerDataCollator
¶
Graphormer data collator
Converts graph dataset into the format accepted by Graphormer model
Source code in mindnlp/transformers/models/graphormer/collating_graphormer.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
mindnlp.transformers.models.graphormer.collating_graphormer.GraphormerDataCollator.__call__(edge_index, edge_attr, y, num_nodes, node_feat, batch_info)
¶
This method, named 'call', is defined within the class 'GraphormerDataCollator' and is used to process data for graph neural network models. It takes the following parameters:
PARAMETER | DESCRIPTION |
---|---|
self |
The instance of the class.
|
edge_index |
A list of edge indices representing the connectivity of nodes in the graph.
TYPE:
|
edge_attr |
A list of edge attributes corresponding to the edges in the graph.
TYPE:
|
y |
A list of target values or labels associated with the graph data.
TYPE:
|
num_nodes |
A list containing the number of nodes in each graph.
TYPE:
|
node_feat |
A list of node features for each graph in the dataset.
TYPE:
|
batch_info |
A dictionary containing batch information for the graphs.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
None. |
RAISES | DESCRIPTION |
---|---|
TypeError
|
If the input parameters are not of the expected types. |
ValueError
|
If the input parameters do not meet specific requirements within the method logic. |
IndexError
|
If there are issues with index access during the processing of graph data. |
Source code in mindnlp/transformers/models/graphormer/collating_graphormer.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
|
mindnlp.transformers.models.graphormer.collating_graphormer.GraphormerDataCollator.__init__(spatial_pos_max=20, on_the_fly_processing=False)
¶
Initializes a new instance of the GraphormerDataCollator class.
PARAMETER | DESCRIPTION |
---|---|
self |
The object instance.
|
spatial_pos_max |
The maximum spatial position value. Defaults to 20.
TYPE:
|
on_the_fly_processing |
Indicates whether on-the-fly processing is enabled or not. Defaults to False.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
None. |
RAISES | DESCRIPTION |
---|---|
ImportError
|
If the required Cython package (pyximport) is not available. |
Source code in mindnlp/transformers/models/graphormer/collating_graphormer.py
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerForGraphClassification
¶
Bases: GraphormerPreTrainedModel
This model can be used for graph-level classification or regression tasks.
It can be trained on
- regression (by setting config.num_classes to 1); there should be one float-type label per graph
- one task classification (by setting config.num_classes to the number of classes); there should be one integer label per graph
- binary multi-task classification (by setting config.num_classes to the number of labels); there should be a list of integer labels for each graph.
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerForGraphClassification.__init__(config)
¶
Initializes a new instance of GraphormerForGraphClassification.
PARAMETER | DESCRIPTION |
---|---|
self |
The instance of the class.
|
config |
An instance of GraphormerConfig containing the configuration settings for the Graphormer model.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
None. |
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerForGraphClassification.forward(input_nodes, input_edges, attn_bias, in_degree, out_degree, spatial_pos, attn_edge_type, labels=None, return_dict=None, **kwargs)
¶
Constructs a Graphormer for graph classification.
This method takes the following parameters:
- self: The object instance.
- input_nodes: A Tensor representing the input nodes.
- input_edges: A Tensor representing the input edges.
- attn_bias: A Tensor representing the attention bias.
- in_degree: A Tensor representing the in-degree of the nodes.
- out_degree: A Tensor representing the out-degree of the nodes.
- spatial_pos: A Tensor representing the spatial positions of the nodes.
- attn_edge_type: A Tensor representing the attention edge types.
- labels: An optional Tensor representing the labels for classification. Defaults to None.
- return_dict: An optional boolean indicating whether to return a dictionary. If not provided, it uses the value from the configuration. Defaults to None.
- **kwargs: Additional keyword arguments.
The method returns a value of type Union[Tuple[Tensor], SequenceClassifierOutput].
PARAMETER | DESCRIPTION |
---|---|
self |
The object instance.
|
input_nodes |
A Tensor representing the input nodes. Shape: [batch_size, sequence_length, hidden_size].
TYPE:
|
input_edges |
A Tensor representing the input edges. Shape: [batch_size, sequence_length, sequence_length, hidden_size].
TYPE:
|
attn_bias |
A Tensor representing the attention bias. Shape: [batch_size, sequence_length, sequence_length].
TYPE:
|
in_degree |
A Tensor representing the in-degree of the nodes. Shape: [batch_size, sequence_length].
TYPE:
|
out_degree |
A Tensor representing the out-degree of the nodes. Shape: [batch_size, sequence_length].
TYPE:
|
spatial_pos |
A Tensor representing the spatial positions of the nodes. Shape: [batch_size, sequence_length, hidden_size].
TYPE:
|
attn_edge_type |
A Tensor representing the attention edge types. Shape: [batch_size, sequence_length, sequence_length].
TYPE:
|
labels |
An optional Tensor representing the labels for classification. Shape: [batch_size, num_classes]. Defaults to None.
TYPE:
|
return_dict |
An optional boolean indicating whether to return a dictionary. If not provided, it uses the value from the configuration. Defaults to None.
TYPE:
|
**kwargs |
Additional keyword arguments.
DEFAULT:
|
RETURNS | DESCRIPTION |
---|---|
Union[Tuple[Tensor], SequenceClassifierOutput]
|
Conditional Return:
|
RAISES | DESCRIPTION |
---|---|
MSELossError
|
If 'labels' is not None and 'num_classes' is 1, but the shape of 'labels' is not compatible with logits. |
CrossEntropyLossError
|
If 'labels' is not None and 'num_classes' is greater than 1, but the shape of 'labels' is not compatible with logits. |
BCEWithLogitsLossError
|
If 'labels' is not None and 'num_classes' is greater than 1, but the shape of 'labels' is not compatible with logits. |
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerModel
¶
Bases: GraphormerPreTrainedModel
The Graphormer model is a graph-encoder model.
It goes from a graph to its representation. If you want to use the model for a downstream classification task, use GraphormerForGraphClassification instead. For any other downstream task, feel free to add a new class, or combine this model with a downstream model of your choice, following the example in GraphormerForGraphClassification.
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerModel.__init__(config)
¶
Initializes a new instance of the GraphormerModel class.
PARAMETER | DESCRIPTION |
---|---|
self |
The instance of the GraphormerModel class.
|
config |
An object of type GraphormerConfig containing the configuration settings for the model. The config parameter is used to set various attributes of the GraphormerModel instance, such as max_nodes, graph_encoder, share_input_output_embed, lm_output_learned_bias, load_softmax, lm_head_transform_weight, activation_fn, and layer_norm.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
None. |
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerModel.forward(input_nodes, input_edges, attn_bias, in_degree, out_degree, spatial_pos, attn_edge_type, perturb=None, masked_tokens=None, return_dict=None, **kwargs)
¶
Construct method in the GraphormerModel class.
PARAMETER | DESCRIPTION |
---|---|
self |
The instance of the class.
|
input_nodes |
The input nodes tensor for the graph.
TYPE:
|
input_edges |
The input edges tensor for the graph.
TYPE:
|
attn_bias |
The attention bias tensor.
TYPE:
|
in_degree |
The in-degree tensor for nodes in the graph.
TYPE:
|
out_degree |
The out-degree tensor for nodes in the graph.
TYPE:
|
spatial_pos |
The spatial position tensor for nodes in the graph.
TYPE:
|
attn_edge_type |
The attention edge type tensor.
TYPE:
|
perturb |
A tensor for perturbation.
TYPE:
|
masked_tokens |
Not implemented; should be None.
TYPE:
|
return_dict |
If True, returns a BaseModelOutputWithNoAttention object.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Union[Tuple[Tensor], BaseModelOutputWithNoAttention]
|
Union[Tuple[Tensor], BaseModelOutputWithNoAttention]: Depending on the value of return_dict, either a tuple containing input_nodes and inner_states or a BaseModelOutputWithNoAttention object. |
RAISES | DESCRIPTION |
---|---|
NotImplementedError
|
If masked_tokens is not None, indicating that the functionality is not implemented. |
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerModel.reset_output_layer_parameters()
¶
Reset output layer parameters
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
1086 1087 1088 1089 1090 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerPreTrainedModel
¶
Bases: PreTrainedModel
An abstract class to handle weights initialization and a simple interface for downloading and loading pretrained models.
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 |
|
mindnlp.transformers.models.graphormer.modeling_graphormer.GraphormerPreTrainedModel.init_graphormer_params(module)
¶
Initialize the weights specific to the Graphormer Model.
Source code in mindnlp/transformers/models/graphormer/modeling_graphormer.py
973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 |
|