Comments (4)
if len(slim_params) % 3 == 0:
slim_params.append(param[:len(param) // 3])
elif len(slim_params) % 3 == 1:
slim_params.append(param[len(param) // 3: len(param) // 3 * 2])
else:
slim_params.append(param[len(param) // 3 * 2:])
from cen.
Hi, thank you for the interest in our work.
In our previous implementation, we manually wrote exchanging codes for 3 or 4 modalities (based on Eq. 6 in the paper) respectively. An example script of 3 modalities is,
def forward(self, x, insnorm, insnorm_threshold):
insnorm0, insnorm1, insnorm2 = insnorm[0].weight.abs(), insnorm[1].weight.abs(), insnorm[2].weight.abs()
x0, x1, x2 = torch.zeros_like(x[0]), torch.zeros_like(x[1]), torch.zeros_like(x[2])
x0[:, insnorm0 >= insnorm_threshold] = x[0][:, insnorm0 >= insnorm_threshold]
x0[:, insnorm0 < insnorm_threshold] = (x[1][:, insnorm0 < insnorm_threshold] + x[2][:, insnorm0 < insnorm_threshold]) / 2
x1[:, insnorm1 >= insnorm_threshold] = x[1][:, insnorm1 >= insnorm_threshold]
x1[:, insnorm1 < insnorm_threshold] = (x[0][:, insnorm1 < insnorm_threshold] + x[2][:, insnorm1 < insnorm_threshold]) / 2
x2[:, insnorm2 >= insnorm_threshold] = x[2][:, insnorm2 >= insnorm_threshold]
x2[:, insnorm2 < insnorm_threshold] = (x[0][:, insnorm2 < insnorm_threshold] + x[1][:, insnorm2 < insnorm_threshold]) / 2
return [x0, x1, x2]
In addition, for 3 modalities, these lines of code should be modified to three disjoint parts, as shown in our supplementary materials (Figure 11 and Figure 12).
from cen.
Hi, thank you very much for the quick response, that was really helpful. How can I modify those lines of code? If you have the sample code for 3 modalities, I would appreciate if you can share it.
Thanks.
from cen.
Thank you very much.
from cen.
Related Issues (17)
- Paper request HOT 2
- Query regarding applicability to other tasks HOT 2
- Formatting iOS Lidar Depth Data For Transfer-Learning HOT 2
- Question about CEN HOT 6
- Non colorised masks HOT 1
- How can get the datasets of "train" and "val" HOT 4
- 为什么对rgb, depth和ens的loss求和? HOT 1
- In the end of CE HOT 9
- Sparsity constraint in channel exchanging HOT 5
- 关于多模态的形式 HOT 1
- About visualization figures in paper HOT 7
- About where the mean(ensemble) is calculated HOT 5
- Some question about the image size HOT 2
- 最终表示的问题 HOT 4
- some question for image size HOT 6
- Method to choose a good lambda (in Equation 4) HOT 4
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 cen.