PSRoIAlign¶ class torchvision.ops.PSRoIAlign(output_size: int, spatial_scale: float, sampling_ratio: int)[來源]¶ 參見 ps_roi_align()。 forward(input: Tensor, rois: Tensor) → Tensor[來源]¶ 定義每次呼叫時執行的計算。 所有子類都應重寫此方法。 注意 儘管前向傳播的實現需要在此函式中定義,但您應該在之後呼叫 Module 例項而不是此函式,因為前者會處理註冊的鉤子,而後者則會靜默忽略它們。