Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
黑眼圈子
arduino-esp32
提交
1c94c38d
A
arduino-esp32
项目概览
黑眼圈子
/
arduino-esp32
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
arduino-esp32
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1c94c38d
编写于
12月 21, 2021
作者:
M
Me No Dev
提交者:
GitHub
12月 21, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
IDF release/v4.4 a79dc75f0a (#6048)
上级
7cf16234
变更
82
展开全部
隐藏空白更改
内联
并排
Showing
82 changed file
with
214 addition
and
191 deletion
+214
-191
platform.txt
platform.txt
+3
-3
tools/platformio-build-esp32.py
tools/platformio-build-esp32.py
+1
-1
tools/platformio-build-esp32c3.py
tools/platformio-build-esp32c3.py
+1
-1
tools/platformio-build-esp32s2.py
tools/platformio-build-esp32s2.py
+1
-1
tools/sdk/esp32/include/config/sdkconfig.h
tools/sdk/esp32/include/config/sdkconfig.h
+4
-2
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp
...2/include/esp-face/include/layer/dl_layer_expand_dims.hpp
+2
-3
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp
...esp32/include/esp-face/include/layer/dl_layer_flatten.hpp
+1
-1
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
...p32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
+11
-11
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp
...k/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp
+2
-2
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp
...k/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp
+2
-2
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp
...k/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp
+2
-2
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp
...k/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp
+15
-15
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp
...dk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp
+1
-1
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp
...esp32/include/esp-face/include/layer/dl_layer_reshape.hpp
+5
-3
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp
...esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp
+1
-2
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp
...k/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp
+4
-4
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp
...p32/include/esp-face/include/layer/dl_layer_transpose.hpp
+13
-2
tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp
...dk/esp32/include/esp-face/include/typedef/dl_variable.hpp
+1
-4
tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h
tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h
+7
-17
tools/sdk/esp32/ld/libcat_face_detect.a
tools/sdk/esp32/ld/libcat_face_detect.a
+0
-0
tools/sdk/esp32/ld/libcolor_detect.a
tools/sdk/esp32/ld/libcolor_detect.a
+0
-0
tools/sdk/esp32/ld/libdl.a
tools/sdk/esp32/ld/libdl.a
+0
-0
tools/sdk/esp32/ld/libhuman_face_detect.a
tools/sdk/esp32/ld/libhuman_face_detect.a
+0
-0
tools/sdk/esp32/ld/libmfn.a
tools/sdk/esp32/ld/libmfn.a
+0
-0
tools/sdk/esp32/lib/libapp_update.a
tools/sdk/esp32/lib/libapp_update.a
+0
-0
tools/sdk/esp32/lib/libdriver.a
tools/sdk/esp32/lib/libdriver.a
+0
-0
tools/sdk/esp32/lib/libesp_littlefs.a
tools/sdk/esp32/lib/libesp_littlefs.a
+0
-0
tools/sdk/esp32/lib/libesp_netif.a
tools/sdk/esp32/lib/libesp_netif.a
+0
-0
tools/sdk/esp32/lib/libesp_rainmaker.a
tools/sdk/esp32/lib/libesp_rainmaker.a
+0
-0
tools/sdk/esp32/lib/libesp_system.a
tools/sdk/esp32/lib/libesp_system.a
+0
-0
tools/sdk/esp32/lib/liblwip.a
tools/sdk/esp32/lib/liblwip.a
+0
-0
tools/sdk/esp32/sdkconfig
tools/sdk/esp32/sdkconfig
+3
-2
tools/sdk/esp32c3/include/config/sdkconfig.h
tools/sdk/esp32c3/include/config/sdkconfig.h
+4
-2
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp
...3/include/esp-face/include/layer/dl_layer_expand_dims.hpp
+2
-3
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp
...p32c3/include/esp-face/include/layer/dl_layer_flatten.hpp
+1
-1
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
...2c3/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
+11
-11
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max2d.hpp
...esp32c3/include/esp-face/include/layer/dl_layer_max2d.hpp
+2
-2
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_min2d.hpp
...esp32c3/include/esp-face/include/layer/dl_layer_min2d.hpp
+2
-2
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_mul2d.hpp
...esp32c3/include/esp-face/include/layer/dl_layer_mul2d.hpp
+2
-2
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_prelu.hpp
...esp32c3/include/esp-face/include/layer/dl_layer_prelu.hpp
+15
-15
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp
.../esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp
+1
-1
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp
...p32c3/include/esp-face/include/layer/dl_layer_reshape.hpp
+5
-3
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp
...p32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp
+1
-2
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp
...esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp
+4
-4
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp
...2c3/include/esp-face/include/layer/dl_layer_transpose.hpp
+13
-2
tools/sdk/esp32c3/include/esp-face/include/typedef/dl_variable.hpp
.../esp32c3/include/esp-face/include/typedef/dl_variable.hpp
+1
-4
tools/sdk/esp32c3/ld/libcat_face_detect.a
tools/sdk/esp32c3/ld/libcat_face_detect.a
+0
-0
tools/sdk/esp32c3/ld/libcolor_detect.a
tools/sdk/esp32c3/ld/libcolor_detect.a
+0
-0
tools/sdk/esp32c3/ld/libdl.a
tools/sdk/esp32c3/ld/libdl.a
+0
-0
tools/sdk/esp32c3/ld/libhuman_face_detect.a
tools/sdk/esp32c3/ld/libhuman_face_detect.a
+0
-0
tools/sdk/esp32c3/ld/libmfn.a
tools/sdk/esp32c3/ld/libmfn.a
+0
-0
tools/sdk/esp32c3/lib/libapp_update.a
tools/sdk/esp32c3/lib/libapp_update.a
+0
-0
tools/sdk/esp32c3/lib/libesp_littlefs.a
tools/sdk/esp32c3/lib/libesp_littlefs.a
+0
-0
tools/sdk/esp32c3/lib/libesp_netif.a
tools/sdk/esp32c3/lib/libesp_netif.a
+0
-0
tools/sdk/esp32c3/lib/libesp_system.a
tools/sdk/esp32c3/lib/libesp_system.a
+0
-0
tools/sdk/esp32c3/lib/liblwip.a
tools/sdk/esp32c3/lib/liblwip.a
+0
-0
tools/sdk/esp32c3/sdkconfig
tools/sdk/esp32c3/sdkconfig
+3
-2
tools/sdk/esp32s2/include/config/sdkconfig.h
tools/sdk/esp32s2/include/config/sdkconfig.h
+4
-2
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp
...2/include/esp-face/include/layer/dl_layer_expand_dims.hpp
+2
-3
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp
...p32s2/include/esp-face/include/layer/dl_layer_flatten.hpp
+1
-1
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
...2s2/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
+11
-11
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max2d.hpp
...esp32s2/include/esp-face/include/layer/dl_layer_max2d.hpp
+2
-2
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_min2d.hpp
...esp32s2/include/esp-face/include/layer/dl_layer_min2d.hpp
+2
-2
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_mul2d.hpp
...esp32s2/include/esp-face/include/layer/dl_layer_mul2d.hpp
+2
-2
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_prelu.hpp
...esp32s2/include/esp-face/include/layer/dl_layer_prelu.hpp
+15
-15
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp
.../esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp
+1
-1
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp
...p32s2/include/esp-face/include/layer/dl_layer_reshape.hpp
+5
-3
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp
...p32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp
+1
-2
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp
...esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp
+4
-4
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp
...2s2/include/esp-face/include/layer/dl_layer_transpose.hpp
+13
-2
tools/sdk/esp32s2/include/esp-face/include/typedef/dl_variable.hpp
.../esp32s2/include/esp-face/include/typedef/dl_variable.hpp
+1
-4
tools/sdk/esp32s2/ld/libcat_face_detect.a
tools/sdk/esp32s2/ld/libcat_face_detect.a
+0
-0
tools/sdk/esp32s2/ld/libcolor_detect.a
tools/sdk/esp32s2/ld/libcolor_detect.a
+0
-0
tools/sdk/esp32s2/ld/libdl.a
tools/sdk/esp32s2/ld/libdl.a
+0
-0
tools/sdk/esp32s2/ld/libhuman_face_detect.a
tools/sdk/esp32s2/ld/libhuman_face_detect.a
+0
-0
tools/sdk/esp32s2/ld/libmfn.a
tools/sdk/esp32s2/ld/libmfn.a
+0
-0
tools/sdk/esp32s2/lib/libapp_update.a
tools/sdk/esp32s2/lib/libapp_update.a
+0
-0
tools/sdk/esp32s2/lib/libesp_littlefs.a
tools/sdk/esp32s2/lib/libesp_littlefs.a
+0
-0
tools/sdk/esp32s2/lib/libesp_netif.a
tools/sdk/esp32s2/lib/libesp_netif.a
+0
-0
tools/sdk/esp32s2/lib/libesp_system.a
tools/sdk/esp32s2/lib/libesp_system.a
+0
-0
tools/sdk/esp32s2/lib/liblwip.a
tools/sdk/esp32s2/lib/liblwip.a
+0
-0
tools/sdk/esp32s2/sdkconfig
tools/sdk/esp32s2/sdkconfig
+3
-2
未找到文件。
platform.txt
浏览文件 @
1c94c38d
此差异已折叠。
点击以展开。
tools/platformio-build-esp32.py
浏览文件 @
1c94c38d
...
...
@@ -303,7 +303,7 @@ env.Append(
"UNITY_INCLUDE_CONFIG_H"
,
"WITH_POSIX"
,
"_GNU_SOURCE"
,
(
"IDF_VER"
,
'
\\
"v4.4-beta1-18
3-gf23dcd3555
\\
"'
),
(
"IDF_VER"
,
'
\\
"v4.4-beta1-18
9-ga79dc75f0a
\\
"'
),
"ESP_PLATFORM"
,
"_POSIX_READER_WRITER_LOCKS"
,
"ARDUINO_ARCH_ESP32"
,
...
...
tools/platformio-build-esp32c3.py
浏览文件 @
1c94c38d
...
...
@@ -293,7 +293,7 @@ env.Append(
"UNITY_INCLUDE_CONFIG_H"
,
"WITH_POSIX"
,
"_GNU_SOURCE"
,
(
"IDF_VER"
,
'
\\
"v4.4-beta1-18
3-gf23dcd3555
\\
"'
),
(
"IDF_VER"
,
'
\\
"v4.4-beta1-18
9-ga79dc75f0a
\\
"'
),
"ESP_PLATFORM"
,
"_POSIX_READER_WRITER_LOCKS"
,
"ARDUINO_ARCH_ESP32"
,
...
...
tools/platformio-build-esp32s2.py
浏览文件 @
1c94c38d
...
...
@@ -290,7 +290,7 @@ env.Append(
"UNITY_INCLUDE_CONFIG_H"
,
"WITH_POSIX"
,
"_GNU_SOURCE"
,
(
"IDF_VER"
,
'
\\
"v4.4-beta1-18
3-gf23dcd3555
\\
"'
),
(
"IDF_VER"
,
'
\\
"v4.4-beta1-18
9-ga79dc75f0a
\\
"'
),
"ESP_PLATFORM"
,
"_POSIX_READER_WRITER_LOCKS"
,
"ARDUINO_ARCH_ESP32"
,
...
...
tools/sdk/esp32/include/config/sdkconfig.h
浏览文件 @
1c94c38d
...
...
@@ -406,7 +406,9 @@
#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5
#define CONFIG_LWIP_ICMP 1
#define CONFIG_LWIP_MAX_RAW_PCBS 16
#define CONFIG_LWIP_SNTP_MAX_SERVERS 1
#define CONFIG_LWIP_SNTP_MAX_SERVERS 3
#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1
#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1
#define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000
#define CONFIG_LWIP_ESP_LWIP_ASSERT 1
#define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1
...
...
@@ -677,5 +679,5 @@
#define CONFIG_ULP_COPROC_RESERVE_MEM CONFIG_ESP32_ULP_COPROC_RESERVE_MEM
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
#define CONFIG_WIFI_LWIP_ALLOCATION_FROM_SPIRAM_FIRST CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP
#define CONFIG_ARDUINO_IDF_COMMIT "
f23dcd3555
"
#define CONFIG_ARDUINO_IDF_COMMIT "
a79dc75f0a
"
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_expand_dims.hpp
浏览文件 @
1c94c38d
...
...
@@ -66,19 +66,18 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
this
->
output
->
set_exponent
(
this
->
output_exponent
);
this
->
output
->
set_shape
(
this
->
output_
shape
);
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
expand_dims
(
this
->
axis
);
this
->
output
->
free_element
();
}
else
{
this
->
output
=
&
input
;
this
->
output
->
set_shape
(
this
->
output_shape
);
this
->
output
->
expand_dims
(
this
->
axis
);
}
this
->
output_shape
=
this
->
output
->
shape
;
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_flatten.hpp
浏览文件 @
1c94c38d
...
...
@@ -59,7 +59,7 @@ namespace dl
this
->
output_shape
=
{
input
.
get_size
()};
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
浏览文件 @
1c94c38d
...
...
@@ -10,14 +10,14 @@ namespace dl
namespace
layer
{
/**
* @brief LeakyRe
LU
(input).
* @brief LeakyRe
lu
(input).
*
* @tparam feature_t supports int16_t and int8_t,
* - int16_t: stands for operation in int16_t quantize
* - int8_t: stands for operation in int8_t quantize
*/
template
<
typename
feature_t
>
class
LeakyRe
LU
:
public
Layer
class
LeakyRe
lu
:
public
Layer
{
private:
feature_t
activation_alpha
;
/*<! quantized alpha >*/
...
...
@@ -28,7 +28,7 @@ namespace dl
std
::
vector
<
int
>
output_shape
;
/*<! output shape of leakyrelu >*/
public:
/**
* @brief Construct a new LeakyRe
LU
object
* @brief Construct a new LeakyRe
lu
object
*
* @param activation_alpha quantized alpha
* @param activation_exponent exponent of quantized alpha
...
...
@@ -36,7 +36,7 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
LeakyRe
LU
(
const
int
activation_alpha
,
const
int
activation_exponent
,
const
char
*
name
=
"LeakyReLU
"
,
bool
inplace
=
false
)
:
Layer
(
name
),
output
(
NULL
),
output_shape
({})
LeakyRe
lu
(
const
int
activation_alpha
,
const
int
activation_exponent
,
const
char
*
name
=
"LeakyRelu
"
,
bool
inplace
=
false
)
:
Layer
(
name
),
output
(
NULL
),
output_shape
({})
{
this
->
activation_alpha
=
activation_alpha
;
this
->
activation_exponent
=
activation_exponent
;
...
...
@@ -44,10 +44,10 @@ namespace dl
}
/**
* @brief Destroy the LeakyRe
LU
object
* @brief Destroy the LeakyRe
lu
object
*
*/
~
LeakyRe
LU
()
~
LeakyRe
lu
()
{
if
((
!
this
->
inplace
)
&&
(
this
->
output
!=
NULL
))
{
...
...
@@ -66,7 +66,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -90,7 +90,7 @@ namespace dl
/**
* @brief Get the output
*
* @return Tensor<feature_t>& LeakyRe
LU
result
* @return Tensor<feature_t>& LeakyRe
lu
result
*/
Tensor
<
feature_t
>
&
get_output
()
{
...
...
@@ -98,11 +98,11 @@ namespace dl
}
/**
* @brief Call LeakyRe
LU
operation.
* @brief Call LeakyRe
lu
operation.
*
* @param input as an input
* @param assign_core not effective yet
* @return LeakyRe
LU
result
* @return LeakyRe
lu
result
*/
Tensor
<
feature_t
>
&
call
(
Tensor
<
feature_t
>
&
input
,
const
std
::
vector
<
int
>
&
assign_core
=
CONFIG_DEFAULT_ASSIGN_CORE
)
{
...
...
@@ -130,7 +130,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
leakyrelu
<
true
>
(
*
this
->
output
,
input
,
this
->
activation_alpha
,
this
->
activation_exponent
,
assign_core
);
nn
::
leakyrelu
(
*
this
->
output
,
input
,
this
->
activation_alpha
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"leakyrelu"
);
}
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_max2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -68,7 +68,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -132,7 +132,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
max2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
nn
::
max2d
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"max2d"
);
}
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_min2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -68,7 +68,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -132,7 +132,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
min2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
nn
::
min2d
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"min2d"
);
}
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_mul2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -75,7 +75,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -140,7 +140,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
mul2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
nn
::
mul2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"mul2d"
);
}
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_prelu.hpp
浏览文件 @
1c94c38d
...
...
@@ -10,17 +10,17 @@ namespace dl
namespace
layer
{
/**
* @brief PRe
LU
(input).
* @brief PRe
lu
(input).
*
* @tparam feature_t supports int16_t and int8_t,
* - int16_t: stands for operation in int16_t quantize
* - int8_t: stands for operation in int8_t quantize
*/
template
<
typename
feature_t
>
class
PRe
LU
:
public
Layer
class
PRe
lu
:
public
Layer
{
private:
feature_t
*
activation_element
;
/*<! quantized alpha elements along channel axis >*/
const
feature_t
*
activation_element
;
/*<! quantized alpha elements along channel axis >*/
int
activation_exponent
;
/*<! exponent of quantized alpha elements >*/
Tensor
<
feature_t
>
*
output
;
/*<! output ptr of prelu >*/
bool
inplace
;
/*<! true: the output will store to input0
...
...
@@ -28,7 +28,7 @@ namespace dl
std
::
vector
<
int
>
output_shape
;
/*<! output shape of prelu >*/
public:
/**
* @brief Construct a new PRe
LU
object
* @brief Construct a new PRe
lu
object
*
* @param activation_element quantized alpha elements along channel axis
* @param activation_exponent exponent of quantized alpha elements
...
...
@@ -36,10 +36,10 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
PRe
LU
(
const
feature_t
*
activation_element
,
PRe
lu
(
const
feature_t
*
activation_element
,
const
int
activation_exponent
=
0
,
const
char
*
name
=
NULL
,
bool
inplace
=
"PReLU"
)
:
Layer
(
name
),
const
char
*
name
=
"PRelu"
,
bool
inplace
=
false
)
:
Layer
(
name
),
activation_element
(
activation_element
),
activation_exponent
(
activation_exponent
),
output
(
NULL
),
...
...
@@ -49,10 +49,10 @@ namespace dl
}
/**
* @brief Destroy the PRe
LU
object
* @brief Destroy the PRe
lu
object
*
*/
~
PRe
LU
()
~
PRe
lu
()
{
if
((
!
this
->
inplace
)
&&
(
this
->
output
!=
NULL
))
{
...
...
@@ -71,7 +71,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -94,7 +94,7 @@ namespace dl
/**
* @brief Get the output
*
* @return Tensor<feature_t>& PRe
LU
result
* @return Tensor<feature_t>& PRe
lu
result
*/
Tensor
<
feature_t
>
&
get_output
()
{
...
...
@@ -102,11 +102,11 @@ namespace dl
}
/**
* @brief Call PRe
LU
operation.
* @brief Call PRe
lu
operation.
*
* @param input as an input
* @param assign_core not effective yet
* @return PRe
LU
result
* @return PRe
lu
result
*/
Tensor
<
feature_t
>
&
call
(
Tensor
<
feature_t
>
&
input
,
const
std
::
vector
<
int
>
&
assign_core
=
CONFIG_DEFAULT_ASSIGN_CORE
)
{
...
...
@@ -125,7 +125,7 @@ namespace dl
DL_LOG_LAYER_LATENCY_START
();
nn
::
prelu
(
*
this
->
output
,
input
,
this
->
activation_element
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
leaky
relu"
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
p
relu"
);
}
else
{
...
...
@@ -135,7 +135,7 @@ namespace dl
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
prelu
(
*
this
->
output
,
input
,
this
->
activation_element
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
leaky
relu"
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
p
relu"
);
}
return
*
this
->
output
;
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_relu.hpp
浏览文件 @
1c94c38d
...
...
@@ -61,7 +61,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_reshape.hpp
浏览文件 @
1c94c38d
...
...
@@ -64,19 +64,21 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
this
->
output
->
set_exponent
(
this
->
output_exponent
);
this
->
output
->
set_shape
(
this
->
output_shape
);
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
reshape
(
this
->
output_shape
);
this
->
output
->
free_element
();
}
else
{
this
->
output
=
&
input
;
this
->
output
->
set_
shape
(
this
->
output_shape
);
this
->
output
->
re
shape
(
this
->
output_shape
);
}
this
->
output_shape
=
this
->
output
->
shape
;
if
(
print_shape
)
{
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_squeeze.hpp
浏览文件 @
1c94c38d
...
...
@@ -66,7 +66,7 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -78,7 +78,6 @@ namespace dl
else
{
this
->
output
=
&
input
;
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
squeeze
(
this
->
axis
);
}
this
->
output_shape
=
this
->
output
->
shape
;
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_sub2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -71,7 +71,7 @@ namespace dl
this
->
output_shape
=
input0
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -120,12 +120,12 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
this
->
output
.
malloc_element
();
this
->
output
->
malloc_element
();
this
->
output
->
set_exponent
(
input0
.
exponent
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"apply"
);
DL_LOG_LAYER_LATENCY_START
();
nn
::
sub2d
(
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
nn
::
sub2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"sub2d"
);
}
else
...
...
@@ -135,7 +135,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
sub2d
<
true
>
(
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
,
this
->
output_exponent
);
nn
::
sub2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
,
this
->
output_exponent
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"sub2d"
);
}
return
*
this
->
output
;
...
...
tools/sdk/esp32/include/esp-face/include/layer/dl_layer_transpose.hpp
浏览文件 @
1c94c38d
...
...
@@ -63,13 +63,24 @@ namespace dl
{
this
->
output_exponent
=
input
.
exponent
;
this
->
output_shape
=
input
.
shape
;
for
(
int
i
=
0
;
i
<
this
->
perm
.
size
();
i
++
)
int
dims
=
this
->
output_shape
.
size
();
if
(
this
->
perm
.
size
()
==
0
)
{
for
(
int
i
=
dims
-
1
;
i
>=
0
;
i
--
)
{
this
->
perm
.
push_back
(
i
);
}
}
for
(
int
i
=
0
;
i
<
dims
;
++
i
)
{
if
(
this
->
perm
[
i
]
<
0
)
this
->
perm
[
i
]
=
dims
+
this
->
perm
[
i
];
this
->
output_shape
[
i
]
=
input
.
shape
[
this
->
perm
[
i
]];
}
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32/include/esp-face/include/typedef/dl_variable.hpp
浏览文件 @
1c94c38d
...
...
@@ -396,9 +396,6 @@ namespace dl
* @brief print all the element of the Tensor.
*
* @param message to print
* @param with_padding one of true or false,
* - true: the padding element will also be ed
* - false: the padding element will not be ed
*/
void
print_all
(
const
char
*
message
=
""
)
{
...
...
@@ -553,4 +550,4 @@ namespace dl
return
output
;
}
};
}
// namespace dl
\ No newline at end of file
}
// namespace dl
tools/sdk/esp32/include/hal/esp32/include/hal/mcpwm_ll.h
浏览文件 @
1c94c38d
// Copyright 2015-2021 Espressif Systems (Shanghai) PTE LTD
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*
* SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
/*******************************************************************************
* NOTICE
...
...
@@ -339,17 +331,15 @@ static inline void mcpwm_ll_timer_set_count_mode(mcpwm_dev_t *mcpwm, int timer_i
static
inline
mcpwm_timer_count_mode_t
mcpwm_ll_timer_get_count_mode
(
mcpwm_dev_t
*
mcpwm
,
int
timer_id
)
{
switch
(
mcpwm
->
timer
[
timer_id
].
timer_cfg1
.
timer_mod
)
{
case
0
:
return
MCPWM_TIMER_COUNT_MODE_PAUSE
;
case
1
:
return
MCPWM_TIMER_COUNT_MODE_UP
;
case
2
:
return
MCPWM_TIMER_COUNT_MODE_DOWN
;
case
3
:
return
MCPWM_TIMER_COUNT_MODE_UP_DOWN
;
case
0
:
default:
HAL_ASSERT
(
false
&&
"unknown count mode"
);
return
mcpwm
->
timer
[
timer_id
].
timer_cfg1
.
timer_mod
;
return
MCPWM_TIMER_COUNT_MODE_PAUSE
;
}
}
...
...
tools/sdk/esp32/ld/libcat_face_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/ld/libcolor_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/ld/libdl.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/ld/libhuman_face_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/ld/libmfn.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/lib/libapp_update.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/lib/libdriver.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/lib/libesp_littlefs.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/lib/libesp_netif.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/lib/libesp_rainmaker.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/lib/libesp_system.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/lib/liblwip.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32/sdkconfig
浏览文件 @
1c94c38d
...
...
@@ -1115,8 +1115,9 @@ CONFIG_LWIP_MAX_RAW_PCBS=16
#
# SNTP
#
CONFIG_LWIP_SNTP_MAX_SERVERS=1
# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set
CONFIG_LWIP_SNTP_MAX_SERVERS=3
CONFIG_LWIP_DHCP_GET_NTP_SRV=y
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
# end of SNTP
...
...
tools/sdk/esp32c3/include/config/sdkconfig.h
浏览文件 @
1c94c38d
...
...
@@ -375,7 +375,9 @@
#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5
#define CONFIG_LWIP_ICMP 1
#define CONFIG_LWIP_MAX_RAW_PCBS 16
#define CONFIG_LWIP_SNTP_MAX_SERVERS 1
#define CONFIG_LWIP_SNTP_MAX_SERVERS 3
#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1
#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1
#define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000
#define CONFIG_LWIP_ESP_LWIP_ASSERT 1
#define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1
...
...
@@ -630,5 +632,5 @@
#define CONFIG_TIMER_TASK_STACK_SIZE CONFIG_ESP_TIMER_TASK_STACK_SIZE
#define CONFIG_TOOLPREFIX CONFIG_SDK_TOOLPREFIX
#define CONFIG_UDP_RECVMBOX_SIZE CONFIG_LWIP_UDP_RECVMBOX_SIZE
#define CONFIG_ARDUINO_IDF_COMMIT "
f23dcd3555
"
#define CONFIG_ARDUINO_IDF_COMMIT "
a79dc75f0a
"
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_expand_dims.hpp
浏览文件 @
1c94c38d
...
...
@@ -66,19 +66,18 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
this
->
output
->
set_exponent
(
this
->
output_exponent
);
this
->
output
->
set_shape
(
this
->
output_
shape
);
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
expand_dims
(
this
->
axis
);
this
->
output
->
free_element
();
}
else
{
this
->
output
=
&
input
;
this
->
output
->
set_shape
(
this
->
output_shape
);
this
->
output
->
expand_dims
(
this
->
axis
);
}
this
->
output_shape
=
this
->
output
->
shape
;
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_flatten.hpp
浏览文件 @
1c94c38d
...
...
@@ -59,7 +59,7 @@ namespace dl
this
->
output_shape
=
{
input
.
get_size
()};
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
浏览文件 @
1c94c38d
...
...
@@ -10,14 +10,14 @@ namespace dl
namespace
layer
{
/**
* @brief LeakyRe
LU
(input).
* @brief LeakyRe
lu
(input).
*
* @tparam feature_t supports int16_t and int8_t,
* - int16_t: stands for operation in int16_t quantize
* - int8_t: stands for operation in int8_t quantize
*/
template
<
typename
feature_t
>
class
LeakyRe
LU
:
public
Layer
class
LeakyRe
lu
:
public
Layer
{
private:
feature_t
activation_alpha
;
/*<! quantized alpha >*/
...
...
@@ -28,7 +28,7 @@ namespace dl
std
::
vector
<
int
>
output_shape
;
/*<! output shape of leakyrelu >*/
public:
/**
* @brief Construct a new LeakyRe
LU
object
* @brief Construct a new LeakyRe
lu
object
*
* @param activation_alpha quantized alpha
* @param activation_exponent exponent of quantized alpha
...
...
@@ -36,7 +36,7 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
LeakyRe
LU
(
const
int
activation_alpha
,
const
int
activation_exponent
,
const
char
*
name
=
"LeakyReLU
"
,
bool
inplace
=
false
)
:
Layer
(
name
),
output
(
NULL
),
output_shape
({})
LeakyRe
lu
(
const
int
activation_alpha
,
const
int
activation_exponent
,
const
char
*
name
=
"LeakyRelu
"
,
bool
inplace
=
false
)
:
Layer
(
name
),
output
(
NULL
),
output_shape
({})
{
this
->
activation_alpha
=
activation_alpha
;
this
->
activation_exponent
=
activation_exponent
;
...
...
@@ -44,10 +44,10 @@ namespace dl
}
/**
* @brief Destroy the LeakyRe
LU
object
* @brief Destroy the LeakyRe
lu
object
*
*/
~
LeakyRe
LU
()
~
LeakyRe
lu
()
{
if
((
!
this
->
inplace
)
&&
(
this
->
output
!=
NULL
))
{
...
...
@@ -66,7 +66,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -90,7 +90,7 @@ namespace dl
/**
* @brief Get the output
*
* @return Tensor<feature_t>& LeakyRe
LU
result
* @return Tensor<feature_t>& LeakyRe
lu
result
*/
Tensor
<
feature_t
>
&
get_output
()
{
...
...
@@ -98,11 +98,11 @@ namespace dl
}
/**
* @brief Call LeakyRe
LU
operation.
* @brief Call LeakyRe
lu
operation.
*
* @param input as an input
* @param assign_core not effective yet
* @return LeakyRe
LU
result
* @return LeakyRe
lu
result
*/
Tensor
<
feature_t
>
&
call
(
Tensor
<
feature_t
>
&
input
,
const
std
::
vector
<
int
>
&
assign_core
=
CONFIG_DEFAULT_ASSIGN_CORE
)
{
...
...
@@ -130,7 +130,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
leakyrelu
<
true
>
(
*
this
->
output
,
input
,
this
->
activation_alpha
,
this
->
activation_exponent
,
assign_core
);
nn
::
leakyrelu
(
*
this
->
output
,
input
,
this
->
activation_alpha
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"leakyrelu"
);
}
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_max2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -68,7 +68,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -132,7 +132,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
max2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
nn
::
max2d
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"max2d"
);
}
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_min2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -68,7 +68,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -132,7 +132,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
min2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
nn
::
min2d
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"min2d"
);
}
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_mul2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -75,7 +75,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -140,7 +140,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
mul2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
nn
::
mul2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"mul2d"
);
}
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_prelu.hpp
浏览文件 @
1c94c38d
...
...
@@ -10,17 +10,17 @@ namespace dl
namespace
layer
{
/**
* @brief PRe
LU
(input).
* @brief PRe
lu
(input).
*
* @tparam feature_t supports int16_t and int8_t,
* - int16_t: stands for operation in int16_t quantize
* - int8_t: stands for operation in int8_t quantize
*/
template
<
typename
feature_t
>
class
PRe
LU
:
public
Layer
class
PRe
lu
:
public
Layer
{
private:
feature_t
*
activation_element
;
/*<! quantized alpha elements along channel axis >*/
const
feature_t
*
activation_element
;
/*<! quantized alpha elements along channel axis >*/
int
activation_exponent
;
/*<! exponent of quantized alpha elements >*/
Tensor
<
feature_t
>
*
output
;
/*<! output ptr of prelu >*/
bool
inplace
;
/*<! true: the output will store to input0
...
...
@@ -28,7 +28,7 @@ namespace dl
std
::
vector
<
int
>
output_shape
;
/*<! output shape of prelu >*/
public:
/**
* @brief Construct a new PRe
LU
object
* @brief Construct a new PRe
lu
object
*
* @param activation_element quantized alpha elements along channel axis
* @param activation_exponent exponent of quantized alpha elements
...
...
@@ -36,10 +36,10 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
PRe
LU
(
const
feature_t
*
activation_element
,
PRe
lu
(
const
feature_t
*
activation_element
,
const
int
activation_exponent
=
0
,
const
char
*
name
=
NULL
,
bool
inplace
=
"PReLU"
)
:
Layer
(
name
),
const
char
*
name
=
"PRelu"
,
bool
inplace
=
false
)
:
Layer
(
name
),
activation_element
(
activation_element
),
activation_exponent
(
activation_exponent
),
output
(
NULL
),
...
...
@@ -49,10 +49,10 @@ namespace dl
}
/**
* @brief Destroy the PRe
LU
object
* @brief Destroy the PRe
lu
object
*
*/
~
PRe
LU
()
~
PRe
lu
()
{
if
((
!
this
->
inplace
)
&&
(
this
->
output
!=
NULL
))
{
...
...
@@ -71,7 +71,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -94,7 +94,7 @@ namespace dl
/**
* @brief Get the output
*
* @return Tensor<feature_t>& PRe
LU
result
* @return Tensor<feature_t>& PRe
lu
result
*/
Tensor
<
feature_t
>
&
get_output
()
{
...
...
@@ -102,11 +102,11 @@ namespace dl
}
/**
* @brief Call PRe
LU
operation.
* @brief Call PRe
lu
operation.
*
* @param input as an input
* @param assign_core not effective yet
* @return PRe
LU
result
* @return PRe
lu
result
*/
Tensor
<
feature_t
>
&
call
(
Tensor
<
feature_t
>
&
input
,
const
std
::
vector
<
int
>
&
assign_core
=
CONFIG_DEFAULT_ASSIGN_CORE
)
{
...
...
@@ -125,7 +125,7 @@ namespace dl
DL_LOG_LAYER_LATENCY_START
();
nn
::
prelu
(
*
this
->
output
,
input
,
this
->
activation_element
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
leaky
relu"
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
p
relu"
);
}
else
{
...
...
@@ -135,7 +135,7 @@ namespace dl
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
prelu
(
*
this
->
output
,
input
,
this
->
activation_element
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
leaky
relu"
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
p
relu"
);
}
return
*
this
->
output
;
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_relu.hpp
浏览文件 @
1c94c38d
...
...
@@ -61,7 +61,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_reshape.hpp
浏览文件 @
1c94c38d
...
...
@@ -64,19 +64,21 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
this
->
output
->
set_exponent
(
this
->
output_exponent
);
this
->
output
->
set_shape
(
this
->
output_shape
);
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
reshape
(
this
->
output_shape
);
this
->
output
->
free_element
();
}
else
{
this
->
output
=
&
input
;
this
->
output
->
set_
shape
(
this
->
output_shape
);
this
->
output
->
re
shape
(
this
->
output_shape
);
}
this
->
output_shape
=
this
->
output
->
shape
;
if
(
print_shape
)
{
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_squeeze.hpp
浏览文件 @
1c94c38d
...
...
@@ -66,7 +66,7 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -78,7 +78,6 @@ namespace dl
else
{
this
->
output
=
&
input
;
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
squeeze
(
this
->
axis
);
}
this
->
output_shape
=
this
->
output
->
shape
;
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_sub2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -71,7 +71,7 @@ namespace dl
this
->
output_shape
=
input0
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -120,12 +120,12 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
this
->
output
.
malloc_element
();
this
->
output
->
malloc_element
();
this
->
output
->
set_exponent
(
input0
.
exponent
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"apply"
);
DL_LOG_LAYER_LATENCY_START
();
nn
::
sub2d
(
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
nn
::
sub2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"sub2d"
);
}
else
...
...
@@ -135,7 +135,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
sub2d
<
true
>
(
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
,
this
->
output_exponent
);
nn
::
sub2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
,
this
->
output_exponent
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"sub2d"
);
}
return
*
this
->
output
;
...
...
tools/sdk/esp32c3/include/esp-face/include/layer/dl_layer_transpose.hpp
浏览文件 @
1c94c38d
...
...
@@ -63,13 +63,24 @@ namespace dl
{
this
->
output_exponent
=
input
.
exponent
;
this
->
output_shape
=
input
.
shape
;
for
(
int
i
=
0
;
i
<
this
->
perm
.
size
();
i
++
)
int
dims
=
this
->
output_shape
.
size
();
if
(
this
->
perm
.
size
()
==
0
)
{
for
(
int
i
=
dims
-
1
;
i
>=
0
;
i
--
)
{
this
->
perm
.
push_back
(
i
);
}
}
for
(
int
i
=
0
;
i
<
dims
;
++
i
)
{
if
(
this
->
perm
[
i
]
<
0
)
this
->
perm
[
i
]
=
dims
+
this
->
perm
[
i
];
this
->
output_shape
[
i
]
=
input
.
shape
[
this
->
perm
[
i
]];
}
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32c3/include/esp-face/include/typedef/dl_variable.hpp
浏览文件 @
1c94c38d
...
...
@@ -396,9 +396,6 @@ namespace dl
* @brief print all the element of the Tensor.
*
* @param message to print
* @param with_padding one of true or false,
* - true: the padding element will also be ed
* - false: the padding element will not be ed
*/
void
print_all
(
const
char
*
message
=
""
)
{
...
...
@@ -553,4 +550,4 @@ namespace dl
return
output
;
}
};
}
// namespace dl
\ No newline at end of file
}
// namespace dl
tools/sdk/esp32c3/ld/libcat_face_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/ld/libcolor_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/ld/libdl.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/ld/libhuman_face_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/ld/libmfn.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/lib/libapp_update.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/lib/libesp_littlefs.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/lib/libesp_netif.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/lib/libesp_system.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/lib/liblwip.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32c3/sdkconfig
浏览文件 @
1c94c38d
...
...
@@ -1134,8 +1134,9 @@ CONFIG_LWIP_MAX_RAW_PCBS=16
#
# SNTP
#
CONFIG_LWIP_SNTP_MAX_SERVERS=1
# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set
CONFIG_LWIP_SNTP_MAX_SERVERS=3
CONFIG_LWIP_DHCP_GET_NTP_SRV=y
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
# end of SNTP
...
...
tools/sdk/esp32s2/include/config/sdkconfig.h
浏览文件 @
1c94c38d
...
...
@@ -328,7 +328,9 @@
#define CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS 5
#define CONFIG_LWIP_ICMP 1
#define CONFIG_LWIP_MAX_RAW_PCBS 16
#define CONFIG_LWIP_SNTP_MAX_SERVERS 1
#define CONFIG_LWIP_SNTP_MAX_SERVERS 3
#define CONFIG_LWIP_DHCP_GET_NTP_SRV 1
#define CONFIG_LWIP_DHCP_MAX_NTP_SERVERS 1
#define CONFIG_LWIP_SNTP_UPDATE_DELAY 3600000
#define CONFIG_LWIP_ESP_LWIP_ASSERT 1
#define CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT 1
...
...
@@ -577,5 +579,5 @@
#define CONFIG_USB_MSC_BUFSIZE CONFIG_TINYUSB_MSC_BUFSIZE
#define CONFIG_USB_MSC_ENABLED CONFIG_TINYUSB_MSC_ENABLED
#define CONFIG_WARN_WRITE_STRINGS CONFIG_COMPILER_WARN_WRITE_STRINGS
#define CONFIG_ARDUINO_IDF_COMMIT "
f23dcd3555
"
#define CONFIG_ARDUINO_IDF_COMMIT "
a79dc75f0a
"
#define CONFIG_ARDUINO_IDF_BRANCH "release/v4.4"
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_expand_dims.hpp
浏览文件 @
1c94c38d
...
...
@@ -66,19 +66,18 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
this
->
output
->
set_exponent
(
this
->
output_exponent
);
this
->
output
->
set_shape
(
this
->
output_
shape
);
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
expand_dims
(
this
->
axis
);
this
->
output
->
free_element
();
}
else
{
this
->
output
=
&
input
;
this
->
output
->
set_shape
(
this
->
output_shape
);
this
->
output
->
expand_dims
(
this
->
axis
);
}
this
->
output_shape
=
this
->
output
->
shape
;
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_flatten.hpp
浏览文件 @
1c94c38d
...
...
@@ -59,7 +59,7 @@ namespace dl
this
->
output_shape
=
{
input
.
get_size
()};
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_leakyrelu.hpp
浏览文件 @
1c94c38d
...
...
@@ -10,14 +10,14 @@ namespace dl
namespace
layer
{
/**
* @brief LeakyRe
LU
(input).
* @brief LeakyRe
lu
(input).
*
* @tparam feature_t supports int16_t and int8_t,
* - int16_t: stands for operation in int16_t quantize
* - int8_t: stands for operation in int8_t quantize
*/
template
<
typename
feature_t
>
class
LeakyRe
LU
:
public
Layer
class
LeakyRe
lu
:
public
Layer
{
private:
feature_t
activation_alpha
;
/*<! quantized alpha >*/
...
...
@@ -28,7 +28,7 @@ namespace dl
std
::
vector
<
int
>
output_shape
;
/*<! output shape of leakyrelu >*/
public:
/**
* @brief Construct a new LeakyRe
LU
object
* @brief Construct a new LeakyRe
lu
object
*
* @param activation_alpha quantized alpha
* @param activation_exponent exponent of quantized alpha
...
...
@@ -36,7 +36,7 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
LeakyRe
LU
(
const
int
activation_alpha
,
const
int
activation_exponent
,
const
char
*
name
=
"LeakyReLU
"
,
bool
inplace
=
false
)
:
Layer
(
name
),
output
(
NULL
),
output_shape
({})
LeakyRe
lu
(
const
int
activation_alpha
,
const
int
activation_exponent
,
const
char
*
name
=
"LeakyRelu
"
,
bool
inplace
=
false
)
:
Layer
(
name
),
output
(
NULL
),
output_shape
({})
{
this
->
activation_alpha
=
activation_alpha
;
this
->
activation_exponent
=
activation_exponent
;
...
...
@@ -44,10 +44,10 @@ namespace dl
}
/**
* @brief Destroy the LeakyRe
LU
object
* @brief Destroy the LeakyRe
lu
object
*
*/
~
LeakyRe
LU
()
~
LeakyRe
lu
()
{
if
((
!
this
->
inplace
)
&&
(
this
->
output
!=
NULL
))
{
...
...
@@ -66,7 +66,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -90,7 +90,7 @@ namespace dl
/**
* @brief Get the output
*
* @return Tensor<feature_t>& LeakyRe
LU
result
* @return Tensor<feature_t>& LeakyRe
lu
result
*/
Tensor
<
feature_t
>
&
get_output
()
{
...
...
@@ -98,11 +98,11 @@ namespace dl
}
/**
* @brief Call LeakyRe
LU
operation.
* @brief Call LeakyRe
lu
operation.
*
* @param input as an input
* @param assign_core not effective yet
* @return LeakyRe
LU
result
* @return LeakyRe
lu
result
*/
Tensor
<
feature_t
>
&
call
(
Tensor
<
feature_t
>
&
input
,
const
std
::
vector
<
int
>
&
assign_core
=
CONFIG_DEFAULT_ASSIGN_CORE
)
{
...
...
@@ -130,7 +130,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
leakyrelu
<
true
>
(
*
this
->
output
,
input
,
this
->
activation_alpha
,
this
->
activation_exponent
,
assign_core
);
nn
::
leakyrelu
(
*
this
->
output
,
input
,
this
->
activation_alpha
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"leakyrelu"
);
}
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_max2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -68,7 +68,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -132,7 +132,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
max2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
nn
::
max2d
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"max2d"
);
}
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_min2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -68,7 +68,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -132,7 +132,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
min2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
nn
::
min2d
(
*
this
->
output
,
input0
,
input1
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"min2d"
);
}
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_mul2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -75,7 +75,7 @@ namespace dl
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -140,7 +140,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
mul2d
<
true
>
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
nn
::
mul2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"mul2d"
);
}
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_prelu.hpp
浏览文件 @
1c94c38d
...
...
@@ -10,17 +10,17 @@ namespace dl
namespace
layer
{
/**
* @brief PRe
LU
(input).
* @brief PRe
lu
(input).
*
* @tparam feature_t supports int16_t and int8_t,
* - int16_t: stands for operation in int16_t quantize
* - int8_t: stands for operation in int8_t quantize
*/
template
<
typename
feature_t
>
class
PRe
LU
:
public
Layer
class
PRe
lu
:
public
Layer
{
private:
feature_t
*
activation_element
;
/*<! quantized alpha elements along channel axis >*/
const
feature_t
*
activation_element
;
/*<! quantized alpha elements along channel axis >*/
int
activation_exponent
;
/*<! exponent of quantized alpha elements >*/
Tensor
<
feature_t
>
*
output
;
/*<! output ptr of prelu >*/
bool
inplace
;
/*<! true: the output will store to input0
...
...
@@ -28,7 +28,7 @@ namespace dl
std
::
vector
<
int
>
output_shape
;
/*<! output shape of prelu >*/
public:
/**
* @brief Construct a new PRe
LU
object
* @brief Construct a new PRe
lu
object
*
* @param activation_element quantized alpha elements along channel axis
* @param activation_exponent exponent of quantized alpha elements
...
...
@@ -36,10 +36,10 @@ namespace dl
* @param inplace true: the output will store to input0
* false: the output will store to a separate memory
*/
PRe
LU
(
const
feature_t
*
activation_element
,
PRe
lu
(
const
feature_t
*
activation_element
,
const
int
activation_exponent
=
0
,
const
char
*
name
=
NULL
,
bool
inplace
=
"PReLU"
)
:
Layer
(
name
),
const
char
*
name
=
"PRelu"
,
bool
inplace
=
false
)
:
Layer
(
name
),
activation_element
(
activation_element
),
activation_exponent
(
activation_exponent
),
output
(
NULL
),
...
...
@@ -49,10 +49,10 @@ namespace dl
}
/**
* @brief Destroy the PRe
LU
object
* @brief Destroy the PRe
lu
object
*
*/
~
PRe
LU
()
~
PRe
lu
()
{
if
((
!
this
->
inplace
)
&&
(
this
->
output
!=
NULL
))
{
...
...
@@ -71,7 +71,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -94,7 +94,7 @@ namespace dl
/**
* @brief Get the output
*
* @return Tensor<feature_t>& PRe
LU
result
* @return Tensor<feature_t>& PRe
lu
result
*/
Tensor
<
feature_t
>
&
get_output
()
{
...
...
@@ -102,11 +102,11 @@ namespace dl
}
/**
* @brief Call PRe
LU
operation.
* @brief Call PRe
lu
operation.
*
* @param input as an input
* @param assign_core not effective yet
* @return PRe
LU
result
* @return PRe
lu
result
*/
Tensor
<
feature_t
>
&
call
(
Tensor
<
feature_t
>
&
input
,
const
std
::
vector
<
int
>
&
assign_core
=
CONFIG_DEFAULT_ASSIGN_CORE
)
{
...
...
@@ -125,7 +125,7 @@ namespace dl
DL_LOG_LAYER_LATENCY_START
();
nn
::
prelu
(
*
this
->
output
,
input
,
this
->
activation_element
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
leaky
relu"
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
p
relu"
);
}
else
{
...
...
@@ -135,7 +135,7 @@ namespace dl
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
prelu
(
*
this
->
output
,
input
,
this
->
activation_element
,
this
->
activation_exponent
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
leaky
relu"
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"
p
relu"
);
}
return
*
this
->
output
;
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_relu.hpp
浏览文件 @
1c94c38d
...
...
@@ -61,7 +61,7 @@ namespace dl
this
->
output_shape
=
input
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_reshape.hpp
浏览文件 @
1c94c38d
...
...
@@ -64,19 +64,21 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
this
->
output
->
set_exponent
(
this
->
output_exponent
);
this
->
output
->
set_shape
(
this
->
output_shape
);
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
reshape
(
this
->
output_shape
);
this
->
output
->
free_element
();
}
else
{
this
->
output
=
&
input
;
this
->
output
->
set_
shape
(
this
->
output_shape
);
this
->
output
->
re
shape
(
this
->
output_shape
);
}
this
->
output_shape
=
this
->
output
->
shape
;
if
(
print_shape
)
{
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_squeeze.hpp
浏览文件 @
1c94c38d
...
...
@@ -66,7 +66,7 @@ namespace dl
this
->
output_exponent
=
input
.
exponent
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -78,7 +78,6 @@ namespace dl
else
{
this
->
output
=
&
input
;
this
->
output
->
set_shape
(
input
.
shape
);
this
->
output
->
squeeze
(
this
->
axis
);
}
this
->
output_shape
=
this
->
output
->
shape
;
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_sub2d.hpp
浏览文件 @
1c94c38d
...
...
@@ -71,7 +71,7 @@ namespace dl
this
->
output_shape
=
input0
.
shape
;
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
@@ -120,12 +120,12 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
this
->
output
.
malloc_element
();
this
->
output
->
malloc_element
();
this
->
output
->
set_exponent
(
input0
.
exponent
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"apply"
);
DL_LOG_LAYER_LATENCY_START
();
nn
::
sub2d
(
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
nn
::
sub2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"sub2d"
);
}
else
...
...
@@ -135,7 +135,7 @@ namespace dl
{
this
->
output
->
set_shape
(
this
->
output_shape
);
}
nn
::
sub2d
<
true
>
(
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
,
this
->
output_exponent
);
nn
::
sub2d
(
*
this
->
output
,
input0
,
input1
,
this
->
activation
,
assign_core
,
this
->
output_exponent
);
DL_LOG_LAYER_LATENCY_END
(
this
->
name
,
"sub2d"
);
}
return
*
this
->
output
;
...
...
tools/sdk/esp32s2/include/esp-face/include/layer/dl_layer_transpose.hpp
浏览文件 @
1c94c38d
...
...
@@ -63,13 +63,24 @@ namespace dl
{
this
->
output_exponent
=
input
.
exponent
;
this
->
output_shape
=
input
.
shape
;
for
(
int
i
=
0
;
i
<
this
->
perm
.
size
();
i
++
)
int
dims
=
this
->
output_shape
.
size
();
if
(
this
->
perm
.
size
()
==
0
)
{
for
(
int
i
=
dims
-
1
;
i
>=
0
;
i
--
)
{
this
->
perm
.
push_back
(
i
);
}
}
for
(
int
i
=
0
;
i
<
dims
;
++
i
)
{
if
(
this
->
perm
[
i
]
<
0
)
this
->
perm
[
i
]
=
dims
+
this
->
perm
[
i
];
this
->
output_shape
[
i
]
=
input
.
shape
[
this
->
perm
[
i
]];
}
if
(
!
this
->
inplace
)
{
if
(
this
->
output
!
=
NULL
)
if
(
this
->
output
=
=
NULL
)
{
this
->
output
=
new
Tensor
<
feature_t
>
;
}
...
...
tools/sdk/esp32s2/include/esp-face/include/typedef/dl_variable.hpp
浏览文件 @
1c94c38d
...
...
@@ -396,9 +396,6 @@ namespace dl
* @brief print all the element of the Tensor.
*
* @param message to print
* @param with_padding one of true or false,
* - true: the padding element will also be ed
* - false: the padding element will not be ed
*/
void
print_all
(
const
char
*
message
=
""
)
{
...
...
@@ -553,4 +550,4 @@ namespace dl
return
output
;
}
};
}
// namespace dl
\ No newline at end of file
}
// namespace dl
tools/sdk/esp32s2/ld/libcat_face_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/ld/libcolor_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/ld/libdl.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/ld/libhuman_face_detect.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/ld/libmfn.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/lib/libapp_update.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/lib/libesp_littlefs.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/lib/libesp_netif.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/lib/libesp_system.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/lib/liblwip.a
浏览文件 @
1c94c38d
无法预览此类型文件
tools/sdk/esp32s2/sdkconfig
浏览文件 @
1c94c38d
...
...
@@ -966,8 +966,9 @@ CONFIG_LWIP_MAX_RAW_PCBS=16
#
# SNTP
#
CONFIG_LWIP_SNTP_MAX_SERVERS=1
# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set
CONFIG_LWIP_SNTP_MAX_SERVERS=3
CONFIG_LWIP_DHCP_GET_NTP_SRV=y
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
# end of SNTP
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录