msp.graphs package¶
Module contents¶
The msp.graphs module includes utility to define MSP instance
as a graph
- class msp.graphs.MSPEmbedGraph(adj_matrix, node_features, edge_features, job_assignment, node_embed, edge_embed)[source]¶
Bases:
msp.graphs._sparse_graph.MSPEmbedGraph,msp.graphs._sparse_graph.MSPSparseGraphNamed Tuple defining Embedded MSP Graph
- class msp.graphs.MSPSparseGraph(adj_matrix: tensorflow.python.framework.ops.Tensor, node_features: tensorflow.python.framework.ops.Tensor, edge_features: tensorflow.python.framework.ops.Tensor, job_assignment: tensorflow.python.framework.ops.Tensor)[source]¶
Bases:
tupleNamed Tuple defining MSP Sparse Graph
- property adj_matrix¶
Alias for field number 0
- property batch_size¶
Get batch size of the batch instance
- property edge_features¶
Alias for field number 2
- property job_assignment¶
Alias for field number 3
- property msp_size¶
Get size of the msp instance
- property node_features¶
Alias for field number 1
- property num_job¶
Get number of job nodes in a graph
- property num_machine¶
Get number of machine nodes in a graph
- property num_node¶
Get number of nodes in a graph
- property shape¶
Get shape of the msp instance
- property unbatch: Callable¶
Unbatch the batch instance
- Parameters
keepdims – if false batch dimension will be removed
- Returns
python generator