zakajd / huawei2020 Goto Github PK
View Code? Open in Web Editor NEWSolution of Huawei Digix Global AI Challenge
Solution of Huawei Digix Global AI Challenge
Hello!
I tried to adapt MAP@R
metric for my task and found out that your implementation has a bug. I just took examples from the original paper and put into your function:
import torch
import numpy as np
conformity_matrix = torch.tensor([[True for _ in range(10)] + [False for _ in range(10)]])
permutation_matrix = torch.tensor([[0, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1, 2, 3, 4, 5, 6, 7, 8, 9]])
np.abs(map_at_k(permutation_matrix, conformity_matrix, topk=None) - 0.1) <= 1e-6
# False
permutation_matrix = torch.tensor([[0, 10, 11, 12, 13, 14, 15, 16, 17, 1, 18, 19, 2, 3, 4, 5, 6, 7, 8, 9]])
np.abs(map_at_k(permutation_matrix, conformity_matrix, topk=None) - 0.12) <= 1e-6
# False
permutation_matrix = torch.tensor([[0, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10, 2, 3, 4, 5, 6, 7, 8, 9]])
np.abs(map_at_k(permutation_matrix, conformity_matrix, topk=None) - 0.2) <= 1e-6
# False
permutation_matrix = torch.arange(20).reshape(1, 20)
np.abs(map_at_k(permutation_matrix, conformity_matrix, topk=None) - 1.0) <= 1e-6
# False
All tests pass correctly if we change line https://github.com/zakajd/huawei2020/blob/master/src/callbacks.py#L91 by:
average_precision = precision.sum(dim=-1) / R
Note: In Google Landmarks task was only to generate good features. No post-processing was allowed, so it's not covered here.
Started training baseline models:
Results aren't good, loss decreasing very slow. For now only loss is tracked, metrics not yet measured.
There may be a bug in the code, so I'll try to just learn a classification task using CrossEntropy Loss first and see if it's possible to learn anything.
[UPDATE WITH RESULTS]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.