def _calc_attention_weights(model, attention_logits_transposed, scope):
    attention_weights = model.Softmax(attention_logits_transposed, s(scope, 'attention_weights'), engine='CUDNN')
    attention_weights_3d = model.net.ExpandDims(attention_weights, s(scope, 'attention_weights_3d'), dims=[2])
    return attention_weights_3d
def _calc_attention_weights(model, attention_logits_transposed, scope):
    attention_weights = model.Softmax(attention_logits_transposed, s(scope, 'attention_weights'), engine='CUDNN')
    attention_weights_3d = model.net.ExpandDims(attention_weights, s(scope, 'attention_weights_3d'), dims=[2])
    return attention_weights_3d