Esempio n. 1
0
def map_gather(params, indices, **kwargs):
    return maybe_ragged_lambda_call(_map_gather, [params, indices],
                                    arguments=kwargs)
Esempio n. 2
0
def apply_row_offset(indices, offset):
    return maybe_ragged_lambda_call(_apply_row_offset, [indices, offset])
Esempio n. 3
0
def reduce_sum(tensor, axis=None, keepdims=False):
    return maybe_ragged_lambda_call(_utils.reduce_sum,
                                    tensor,
                                    arguments=dict(axis=axis,
                                                   keepdims=keepdims))
Esempio n. 4
0
def get_row_offsets(tensor):
    return maybe_ragged_lambda_call(_utils.get_row_offsets, tensor)
Esempio n. 5
0
def merge_features(node_features, edge_features):
    return maybe_ragged_lambda_call(_utils.merge_features,
                                    [node_features, edge_features])
Esempio n. 6
0
def reshape_final_dim(tensor, final_dims):
    return maybe_ragged_lambda_call(_utils.reshape_final_dim,
                                    tensor,
                                    arguments=dict(final_dims=final_dims))
Esempio n. 7
0
def flatten_leading_dims(tensor, n=2):
    return maybe_ragged_lambda_call(_utils.flatten_leading_dims,
                                    tensor,
                                    arguments=dict(n=n))