协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
recurrent-layers【开发与工程】Guide PyTorch Geometric Temporal recurrent graph layer selection, shape/state contracts, and tiny forecasting smoke tests.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user is building, debugging, or smoke-testing a PyTorch Geometric Temporal model whose core temporal operator is a recurrent graph layer.
Load this sub-skill for requests such as:
H, C, lambda_max, periods, or batch tensors have?"torch.nn.Linear head after a recurrent temporal layer"This sub-skill covers the recurrent exports in torch_geometric_temporal.nn.recurrent:
GConvGRU, GConvLSTM, GCLSTM.DCRNN, BatchedDCRNN.TGCN, TGCN2, A3TGCN, A3TGCN2.LRGCN, DyGrEncoder, EvolveGCNH, EvolveGCNO, MPNNLSTM, AGCRN.The recurrent layers return hidden representations and states. They do not include the final forecasting/classification nonlinearity, loss, metric, optimizer, or task head unless explicitly stated by that layer. Add torch.nn.functional.relu, dropout, and torch.nn.Linear heads in the surrounding model when the task needs them.
Stay in this sub-skill for recurrent temporal graph layer selection, forward-call signatures, state management, shape debugging, and the bundled synthetic smoke script.
Route elsewhere when the user's main question is about:
STConv, ASTGCN, MSTGCN, GMAN, MTGNN, AAGCN, DNNTSP, or HeteroGCLSTM: use attention-and-hetero-layers.dataset-loaders.temporal_signal_split: use temporal-signals.IndexDataset, get_index_dataset, index-batching tuple unpacking, or Dask-DDP: use index-batching.X shaped [num_nodes, in_channels]; batched recurrent variants use batch-aware shapes such as [batch_size, num_nodes, in_channels] or [batch_size, sequence_length, num_nodes, in_channels].hidden = F.relu(hidden); prediction = torch.nn.Linear(hidden_dim, target_dim)(hidden).H/C to None, or whether the returned state is passed into the next snapshot. Read workflow recipes for both patterns.edge_index is always a long tensor shaped [2, num_edges].edge_weight is a float tensor shaped [num_edges] when provided. Some diffusion/batched helpers need explicit weights; use ones for an unweighted synthetic graph.normalization=None or "rw") require lambda_max in forward.A3TGCN expects X shaped [num_nodes, in_channels, periods]; A3TGCN2 expects [batch_size, num_nodes, in_channels, periods].AGCRN uses node embeddings E shaped [num_nodes, embedding_dimensions] instead of edge_index.TGCN2/A3TGCN2 patterns, and optional Lightning caveats.lambda_max, batch_size/periods mistakes, state leaks, and network-heavy example caveats.--help and --layer choices.