As part of integrating Deep Q-Networks in swift-models PR #617, the Raw.gatherNd() operator was needed. No extension to Tensor implemented this, so a dimensionGathering() function on Tensor was added here.
This should be lifted up from initial testing in swift-models to be part of swift-apis. The dimensionGathering() name should also be reviewed and renamed if needed. This might be a multi-step process, possibly renaming the old interface in swift-models to avoid a collision, adding the new interface in swift-apis, and then removing the interface in swift-models.
Tests should also be added to verify proper function in swift-apis.