yl-1993 / hfsoftmax Goto Github PK
View Code? Open in Web Editor NEWAccelerated Training for Massive Classification via Dynamic Class Selection (AAAI 2018)
License: MIT License
Accelerated Training for Massive Classification via Dynamic Class Selection (AAAI 2018)
License: MIT License
Hello, I am using a non-sampling training model, and the loss always changes within a small range[-0.5,0.5]. When using the hf_sample method, the network loss rapidly increases to nan. Does the sample method require a pre-trained model?
which version of pytorch is used in this project?
Hi, when the number of classes is nearly 100k(MS-Celeb-1M), i think annoy could build hash forest in an acceptable time.
But as the number of classes becomes larger, considered as a "massive classification", nearly 1 million, the HF building time seems unacceptable(I tried annoy building a 1 million features and set n_trees = 100, feat_dim = 2048, it costs ~22 minutes).
So is there a solution, or do you have any advice?
Thank you!
Hello, I am a beginner, trying to extract features, can you tell me what the three parameters prefix, filelist, load_path mean?
@yl-1993 Hi, i try to train the model with webface, then this problem appears。
How should I solve this problem
I have thousands of pictures,i want to use extract_feat.py to extract features,I want to know how to get the bin file?
THX.
Hi, I have two problems about the hfsoftmax
Hi, It's a great work. When I am using the sampling layer(hnsw_sampler.py), the program runs to 'update_hf ' function, falls into an infinite loop in 'get_value_by_rows', and cannot enter the conditional judgment. Part of the code is as follows:
#####################################################
while True:
sockets = dict(self._poll.poll(1000))
if self._socket in sockets:
msg = self._socket.recv()
if not meta:
meta = json.loads(msg)
else:
data = np.frombuffer(msg, dtype=meta['dtype'])
return data.reshape(meta['shape'])
#####################################################
your idea is very good! I am curious whether this method can be used for text classification?
I greatly admire your paper, can I ask for source code to have a look.
Thank you very much.
File "/home/adam/anaconda3/envs/torch04/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 303, in forward
self.padding, self.dilation, self.groups)
TypeError: conv2d(): argument 'input' (position 1) must be Tensor, not list
Here, the convolution operation will report an error. You should enter a tensor. Actually enter a list composed of two tensors. I want to ask the author how to solve it.
Hi, It's a great work, Could you tell me how to generate training/validation list since the rec2ims.py didn't generate these list files.
def _recv(self):
# TODO:
# 1. use logging to better log server info
# 2. better exception handling
print('waiting for message ... ')
packet = self._socket.recv_multipart()
print(packet)
print(len(packet))
if len(packet) == 2:
ident, msg = packet
msg = self._parse_json(msg)
elif len(packet) == 4:
ident, msg, meta, data = packet
msg, meta = map(self._parse_json, [msg, meta])
if msg['op'] == 'set_matrix':
msg['data'] = self._buf_to_ndarray(data, meta)
else:
msg['rows'] = self._buf_to_ndarray(data, meta)
elif len(packet) == 6:
ident, msg, rows_meta, rows_data, val_meta, val_data = packet
msg, rows_meta, val_meta = map(self._parse_json, [msg, rows_meta, val_meta])
msg['rows'] = self._buf_to_ndarray(rows_data, rows_meta)
msg['data'] = self._buf_to_ndarray(val_data, val_meta)
else:
raise RuntimeError('Unsupported msg type')
self.handle(ident, msg)
always raise an error: RuntimeError('Unsupported msg type')
I find where the error shows up, but don't why?
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.