fix avg pooling, count_include_pad
nits
This commit is contained in:
parent
379f89fbbe
commit
49f09aa72c
3 changed files with 5 additions and 5 deletions
|
@ -6056,7 +6056,7 @@ static __global__ void pool2d_nchw_kernel(
|
|||
const int start_w = cur_ow * sw - pw;
|
||||
const int bw = max(0, start_w);
|
||||
const int ew = min(iw, start_w + kw);
|
||||
const To scale = 1. / ((eh - bh) * (ew - bw));
|
||||
const To scale = 1. / (kh * kw);
|
||||
To res = 0;
|
||||
switch(op){
|
||||
case GGML_OP_POOL_AVG: res = 0; break;
|
||||
|
|
4
ggml.c
4
ggml.c
|
@ -5569,8 +5569,8 @@ struct ggml_tensor * ggml_pool_2d(
|
|||
int k1,
|
||||
int s0,
|
||||
int s1,
|
||||
float p0,
|
||||
float p1) {
|
||||
int p0,
|
||||
int p1) {
|
||||
|
||||
bool is_node = false;
|
||||
|
||||
|
|
4
ggml.h
4
ggml.h
|
@ -1600,8 +1600,8 @@ extern "C" {
|
|||
int k1,
|
||||
int s0,
|
||||
int s1,
|
||||
float p0,
|
||||
float p1);
|
||||
int p0,
|
||||
int p1);
|
||||
|
||||
// nearest interpolate
|
||||
// used in stable-diffusion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue