Comments (6)
SelfAttention
itself also looks suspicious. If input tensor is a square (i.e., H
equals W
), then mode='h'
and mode='w'
will lead to the very same output. These two modes are used in PAA_kernel
and PAA_d
modules, so I guess they are expected to produce different outputs.
from inspyrenet.
Interesting, if you have time I suggest you can dig into https://github.com/plemeri/UACANet, which is where PAA_e and PAA_d from.
from inspyrenet.
Hi, thanks for paying attention to our work.
We initially tried to solve a image resolution problem for Object Contextual Representation architecture which we have been used for the attention-based segmentation decoder and thought it might be useful for the other attention operations such as PAA
modules but empirically we found that it wasn't necessary. Those parameters are deprecated and no longer in use.
from inspyrenet.
Got it, thank you!
Though the question about mode
parameter in SelfAttention
still remains. It doesn’t seem correct that mode=“h”
and mode=“w”
produce the same results for square images. Looks like this mode
parameter is used incorrectly.
Now the transformation applied to feature tensors looks like
axis = 1
if "h" in self.mode:
axis *= height
if "w" in self.mode:
axis *= width
view = (batch_size, -1, axis)
x = x.view(*view)
It is correct for mode="w"
but seems to be incorrect for mode="h"
. If I understand correctly, in that case it rather should be something like
x = x.permute(0, 1, 3, 2).reshape(*view) # view = (batch_size, -1, height)
That is, we should additionally transpose H
and W
dimensions.
from inspyrenet.
You are once again right about the problem. This was actually came from our previous work UACANet - issue #8 but we do not found any meaningful performance difference at that time, so we didn't change at that moment.
If you're trying to do a research or developing your own work, you can either change it into the right source code or just leave it as is.
from inspyrenet.
Ok, thanks!
from inspyrenet.
Related Issues (20)
- Not getting the same quality as the hugging face web demo model HOT 2
- Train with another shape HOT 1
- Unexpected keys in state_dict when trying inference HOT 1
- Model difference between Res2Net50 Backbone and Res2Net50 [DUTS-TR] trained checkpoint HOT 3
- Unable to reproduce models and Increasing validation loss HOT 1
- Overflow NaN can be happen in training HOT 1
- unable to load jit model HOT 2
- Some confusion about dynamic_resize HOT 2
- Image mask alignment problem HOT 4
- train custom dataset HOT 2
- Multiple masks area HOT 1
- InSPyReNet for mask refinement? HOT 1
- Error/Warning about get_root_logger and load_checkpoint HOT 7
- Fine tuning HOT 9
- InSPyReNet_SwinB_DIS5K_LR Result Download Failed HOT 1
- HR CustomDataset Finetuning HOT 2
- Is this undertrained HOT 2
- Downloading InSPyReNet models and testing them...
- inspyrenet is the best architecture of image segmentation i've used so far, please keep upgrading HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from inspyrenet.