Deep Learning Schema Conversion for Imperative-to-Declarative Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current deep learning frameworks face challenges in balancing usability and performance deployment between imperative and declarative programming schemas, with existing schema conversion methods lacking optimization and leading to high computing resource consumption and restricted operation consistency.
Innovation Solution
A schema conversion method that includes updating and optimizing the imperative programming schema to reduce redundant statements and loop nesting, followed by mapping and combining syntax elements to generate an optimized declarative programming schema, utilizing a computing device to parse, update, and convert syntax elements.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If imperative programming schema is used, then usability and ease of debugging are improved, but computing resource consumption increases
Solution Approach 1:
The patent applies inversion by converting from imperative programming schema to declarative programming schema. Instead of executing operations immediately as in imperative programming, the system builds a computation graph first and then executes it, reversing the traditional execution flow to reduce computing resource consumption while maintaining usability through automated conversion tools
Solution Approach 2:
The patent changes the execution model parameter from dynamic immediate execution to static graph-based execution. By transforming the programming paradigm and execution parameters, the system achieves both improved computing resource efficiency and maintained usability through automated schema conversion
2Use of energy by moving object
If declarative programming schema is used, then computing resource consumption is reduced, but ease of writing and debugging becomes difficult
Solution Approach 1:
The patent introduces an automated schema conversion system as an intermediary that translates imperative programming code into declarative programming schema. This mediator handles the complexity of graph construction and optimization, allowing users to write simple imperative code while the system automatically generates efficient declarative representations
Solution Approach 2:
The system performs self-service by automatically converting imperative schemas to declarative schemas without requiring manual intervention. The automated conversion process handles graph construction, optimization, and execution plan generation, freeing users from the complexity of manual schema design while achieving computing resource efficiency
3Productivity
If schema conversion is performed without optimization, then conversion simplicity is maintained, but execution speed and flexibility are reduced
Solution Approach 1:
The patent applies preliminary action by performing schema optimization and analysis before the actual conversion process. The system analyzes the imperative schema, identifies optimization opportunities, and prepares an optimized execution plan in advance, which improves execution speed while managing conversion complexity through structured preprocessing steps
Data Source
Figure 1
Figure 2
Figure 3
AI summary
According to exemplary embodiments of the present disclosure, there is provided a method and apparatus of converting a schema in a deep learning framework, and a computer storage medium, and a computer program product, which may be used for a construction of the deep learning framework. The method of converting the schema in the deep learning framework includes: updating a first schema, based on first syntax elements in the first schema and a context relationship between the first syntax elements in the first schema, so as to obtain an updated first schema; generating second syntax elements corresponding to updated first syntax elements in the updated first schema, based on a mapping relationship between the updated first syntax elements in the updated first schema and second syntax elements in a second schema system; and combining the second syntax elements according to a context relationship between the updated first syntax elements, so as to generate a second schema. According to a solution of the present disclosure, the schema conversion may be performed efficiently.