Skip to content

Commit

Permalink
docs: complete the images in the document
Browse files Browse the repository at this point in the history
  • Loading branch information
GaoNeng-wWw committed Mar 23, 2024
1 parent 772b7ed commit 9cbdd29
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 151 deletions.
52 changes: 28 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ ls -al
# .github
# dl-flow-backend // 后端
# dl-flow-frontend // WebUi
# dl-flow.code-workspace
# docker-compose.yaml // 预设好的docker-compose文件
# nginx.conf // 预设好的nginx文件
```
Expand Down Expand Up @@ -152,8 +151,6 @@ cd packages/design-core/dist

### 流程图



### Web UI

下图展示了项目与TinyEngine的差异文件
Expand Down Expand Up @@ -214,27 +211,34 @@ cd packages/design-core/dist
└── property-setting.vue
```

```mermaid
sequenceDiagram
Front->>+Back: 登录
Back->>Back: 校验邮箱与密码
Back->>-Front: 返回Token
Front->>+Back: 请求物料
Back->>-Front: 返回物料信息
Front->>+Back: 建立Websocket链接
Back->>Back: 检查Token
Back->>-Front: 建立连接
Front->>Front: 设计
Front->>+Back: 携带Schema发送createCodeGenerate事件
Back->>Back: 校验
Back->>Back: DSL转AST
Back->>Back: AST生成代码
Back->>Back: 写入磁盘
Back->>-Front: 携带文件名, 返回Done事件
Front->>+Back: 请求 /code-generate/文件名
Back->>-Front: 返回文件
### 后端

[参考](./dl-flow-backend/README.md)


### 为什么结束节点和开始节点必须只有一个

因为目前生成的是`Sequential`而不是`Layer`.

`Layer`的确更加的灵活。但是问题也非常的显而易见。

我们设计的是又向无环图, 又向表明 A->B 是正确的,但是 B->A 是不一定的。假设有一幅图

```
Start
|
v
Node-1
|
-----+-----
| | |
V V V
END1 END2 END3
```

### 后端
那么不管如何遍历最终节点,其实都是正确的。但在神经网络中,不同网络的运算顺序会有不同的结果。比如`先池化后卷积``先卷积后池化`的运算结果是不同的。进入训练阶段,训练结果也可能不同。这主要是因为函数的组合在某些条件下是不可交换的,我们也使用数学语言证明了这一点。详细可以参考[函数组合的交换性讨论](./dl-flow-backend/proof/函数组合的可交换性讨论.pdf)


## 前端流程图

[参考](./dl-flow-backend/README.md)
![](./public/sequenceDiagram.png)
7 changes: 0 additions & 7 deletions dl-flow-backend/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# Dl-flow backend

## 如何使用

1. 确保本机安装了docker
2. 克隆该仓库
3. `cd dl-flow-backend; docker compose up -d `
4. 即可访问

## 目录结构

```
Expand Down
33 changes: 16 additions & 17 deletions dl-flow-backend/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,23 +10,22 @@ services:
ports:
- 6379:6379
server:
build:
context: .
dockerfile: Dockerfile
image: gaonengwww/dl-flow-backend
ports:
- 9000:9000
environment:
- DB_URL=mongodb://mongodb:27017/dl-flow
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=0
# - REDIS_PASSWORD=""
# - JWT_EXPIRE_IN=""
# - JWT_SIGN_ALGORITHM=""
- JWT_PUB_KEY=./keys/pub.key
- JWT_PRI_KEY=./keys/pri.key
# - PWD_SALT=""
volumes:
- ./_test/public:/public
- ./_test/keys:/keys
- ./_test/data:/data
- DB_URL=mongodb://mongodb:27017/dl-flow # 数据库地址
- REDIS_HOST=redis # redis地址 (必填)
- REDIS_PORT=6379 # redis端口 (必填)
- REDIS_DB=0 # redis数据库 (必填)
- REDIS_PASSWORD="" # redis密码
- JWT_EXPIRE_IN="1d" # JWT 过期时间 (必填)
- JWT_SIGN_ALGORITHM="RS256" # JWT签名算法, 要与密钥对符合, 例如密钥对是RSA 2048bit, 那么此处应该是 RS256 (必填)
- JWT_PUB_KEY=./keys/key.pub # JWT 公钥 (必填)
- JWT_PRI_KEY=./keys/key.pri # JWT 私钥 (必填)
- PWD_SALT=salt # bcrypt 盐(必填)
- PWD_SALT_LEN=12 # bcrypt 盐(必填)
# volumes: # 强烈将下述卷挂载到本地, 以避免数据丢失
# - ./_test/public:/public # 代码生成暂存位置
# - ./_test/keys:/keys # 密钥对存放位置
# - ./_test/data:/data # bundle.json与install.lock 存放位置
25 changes: 1 addition & 24 deletions dl-flow-backend/src/code-generate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,7 @@

## 流程图

```mermaid
stateDiagram
state join1 <<join>>
state join2 <<join>>
[*] --> CodeGenerateService.ts
CodeGenerateService.ts --> AST.ts
state CodeGenerateService.ts {
验证Schema --> 提取节点
验证Schema --> 提取边
提取节点 --> join1
提取边 --> join1
join1 --> 标准化节点
join1 --> 标准化边
标准化节点 --> join2
标准化边 --> join2
join2 --> [*]
}
state AST.ts {
顺序化节点 --> AST构建
AST构建 --> 代码生成
}
代码生成 --> 写入磁盘
写入磁盘 --> [*]
```
![](../../../public/3bb36ea8-b6cc-48ae-b227-1118f3b0a4c6.png)

## 附件

Expand Down
79 changes: 0 additions & 79 deletions dl-flow-frontend/README.md

This file was deleted.

Binary file added public/3bb36ea8-b6cc-48ae-b227-1118f3b0a4c6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/sequenceDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9cbdd29

Please sign in to comment.