libcity.model.road_representation.GeomGCN¶
-
class
libcity.model.road_representation.GeomGCN.GeomGCN(config, data_feature)[源代码]¶ 基类:
libcity.model.abstract_traffic_state_model.AbstractTrafficStateModel-
calculate_loss(batch)[源代码]¶ - 参数
batch – dict, need key ‘node_features’, ‘node_labels’, ‘mask’
Returns:
-
forward(batch)[源代码]¶ 自回归任务
- 参数
batch – dict, need key ‘node_features’ contains tensor shape=(N, feature_dim)
- 返回
N, output_classes
- 返回类型
torch.tensor
-
training: bool¶
-
-
class
libcity.model.road_representation.GeomGCN.GeomGCNNet(g, in_feats, out_feats, num_divisions, activation, num_heads, dropout_prob, ggcn_merge, channel_merge, device)[源代码]¶ 基类:
torch.nn.modules.module.Module-
forward(feature)[源代码]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
注解
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training: bool¶
-
-
class
libcity.model.road_representation.GeomGCN.GeomGCNSingleChannel(g, in_feats, out_feats, num_divisions, activation, dropout_prob, merge, device)[源代码]¶ 基类:
torch.nn.modules.module.Module-
forward(feature)[源代码]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
注解
Although the recipe for forward pass needs to be defined within this function, one should call the
Moduleinstance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
training: bool¶
-