Skip to content

Commit

Permalink
fix avgpool imanagezono
Browse files Browse the repository at this point in the history
  • Loading branch information
Wei-TianHao committed Aug 4, 2024
1 parent dd61366 commit 42c3209
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/propagate/operators/pooling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,9 @@ also of type `ImageZonoBound`.
type.
"""
function propagate_layer(prop_method, layer::MeanPool, bound::ImageZonoBound, batch_info)
if size(bound.generators,4) > 0
new_center = layer(bound.center)
new_generators = layer(bound.generators)
return ImageZonoBound(new_center, new_generators)
else
new_center = layer(bound.center)
new_generators = zero(new_center)[:,:,:,1:0]
return ImageZonoBound(layer(bound.center), new_generators)
end
new_center = layer(bound.center)
new_generators = size(bound.generators,4) > 0 ? layer(bound.generators) : reshape(bound.generators, size(new_center)..., 0)
return ImageZonoBound(new_center, new_generators)
end

function propagate_layer_batch(prop_method::IBP, layer::MeanPool, bound::IBPBound, batch_info)
Expand Down

0 comments on commit 42c3209

Please sign in to comment.