Get aggregated embeddings of full neighbors of batch seed nodes. The shape of neighbors embeddings is `[total_num_nbrs, float_attr_num]`. After aggregation, the shape is `[redcued_num_nbrs, float_attr_num]`. Args: func ("sum" | "mean" | "min" | "max" | "prod"): the bu
(self, func="sum")
| 428 | raise StopIteration |
| 429 | |
| 430 | def embedding_agg(self, func="sum"): |
| 431 | """ |
| 432 | Get aggregated embeddings of full neighbors of batch seed nodes. |
| 433 | The shape of neighbors embeddings is `[total_num_nbrs, float_attr_num]`. |
| 434 | After aggregation, the shape is `[redcued_num_nbrs, float_attr_num]`. |
| 435 | |
| 436 | Args: |
| 437 | func ("sum" | "mean" | "min" | "max" | "prod"): |
| 438 | the built-in aggregate functions. |
| 439 | """ |
| 440 | float_attr_num = self._get_decoder().float_attr_num |
| 441 | batch_size = len(self.offsets) |
| 442 | segment_ids = \ |
| 443 | [i for i in range(batch_size) for _ in range(self.offsets[i])] |
| 444 | agged = self._agg(func, segment_ids, batch_size) |
| 445 | return np.reshape(agged, (batch_size, float_attr_num)) |
| 446 | |
| 447 | |
| 448 | class Edges(Values): |
nothing calls this directly
no test coverage detected