get-operation-shape-names.js 595 B

1234567891011121314151617181920
  1. function getOperationShapeNames(model) {
  2. var operationShapeNames = [];
  3. var operations = model.operations;
  4. for (var operationName of Object.keys(operations)) {
  5. var operation = operations[operationName];
  6. if (operation.input && operation.input.shape) {
  7. operationShapeNames.push(operation.input.shape);
  8. }
  9. if (operation.output && operation.output.shape) {
  10. operationShapeNames.push(operation.output.shape);
  11. }
  12. }
  13. return operationShapeNames;
  14. };
  15. module.exports = {
  16. getOperationShapeNames: getOperationShapeNames
  17. };