ml_switcheroo.plugins.in_top_k_plugin¶

Generic plugin for in_top_k. Checks if target indices are present in top_k(predictions).

Functions¶

in_top_k_plugin(→ libcst.CSTNode)

Plugin Hook: Generic plugin for in_top_k. Checks if target indices are present in top_k(predictions).

Module Contents¶

ml_switcheroo.plugins.in_top_k_plugin.in_top_k_plugin(node: libcst.Call, ctx: ml_switcheroo.core.hooks.HookContext) → libcst.CSTNode[source]¶

Plugin Hook: Generic plugin for in_top_k. Checks if target indices are present in top_k(predictions).