This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model Approach | 1 | 2 | 3 | 4 | 5 | |
---|---|---|---|---|---|---|
Number of Top Neighbors | ||||||
1 of 5 | 18.54% | 11.14% | 5.86% | 4.73% | 5.83% | |
5 of 5 | 1.55% | 15.73% | 45.74% | 57.10% | 43.78% | |
Avg | 2.25 | 3.00 | 3.84 | 4.05 | 3.81 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model Approach | Top-1 Acc Change | Top-5 Acc Change | |
---|---|---|---|
2 | +16.74 | +23.42 | |
3 | +17.13 | +23.49 | |
4 | +16.40 | +22.42 | |
5 | +16.73 | +23.64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Model Approach | True Class | Top 20 Nearest Neighbors | All Other | |
---|---|---|---|---|
One hot encoding | 1.0 | 0.0 | 0.0 | |
Uniform label smoothing | 0.9 | 0.1/4349 | 0.1/4349 | |
Uniform label smoothing | 0.9 | 0.1/20 | 0.0 | |
Label smoothing | Based on semantic similarities | Based on semantic similarities | 0.0 | |
Label smoothing + Curriculum learning | Based on semantic similarities | Based on semantic similarities | 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def forward(self, x): | |
image_features, text_features = x | |
concat_features = torch.cat((image_features, text_features), dim=-1) | |
weights = torch.nn.functional.softmax(self.atten_p(concat_features), dim=-1) | |
fused_feature = weights[:, 0].unsqueeze(1) * image_features + weights[:, 1].unsqueeze(1) * text_features | |
logits = self.ft_network(fused_feature) | |
return logits | |
def training_step(self, batch, batch_idx): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import acm.graphics.*; | |
import acm.program.*; | |
public class BouncingBall extends GraphicsProgram { | |
/** | |
* Initialize the ball and its velocity components | |
*/ | |
public void init() { | |
ball = new GBall(BALL_RADIUS); | |
add(ball, getWidth() / 2, getHeight() / 2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// paste the code in spark shell | |
import java.nio.ByteBuffer | |
import java.util.SortedMap | |
import scala.collection.JavaConversions._ | |
import org.apache.cassandra.db.IColumn | |
import org.apache.cassandra.hadoop.ColumnFamilyOutputFormat | |
import org.apache.cassandra.hadoop.ConfigHelper |