jwyang / JULE.torch

Torch code for our CVPR 2016 paper "Joint Unsupervised LEarning of Deep Representations and Image Clusters"
MIT License
288 stars 82 forks source link

parameters set #5

Closed frankwanL closed 7 years ago

frankwanL commented 8 years ago

hi, I have run your code successfully! now, I want to know how to set the target number of clusters, the initial image labels and CNN parameters. thank you!

jwyang commented 8 years ago

Hi, great,

In my code, the target number of clusters is equal to the groundtruth number of clusters in the dataset. I used _target_nclusterstable to store the target numbers of clusters, and it is initialized at line 163 in train.lua, you may change that.

The initial image labels are obtained by running: label_pre = agg_clustering.init(ind) at line 205 in train.lua. It is simply find samples along the nearest neighbor chain.

In terms of CNN parameters, they are all randomly initialized using the function NetInit(net) at line 79 in train.lua.

Please let me know if you have any further issues.

frankwanL commented 8 years ago

I try to train my own dataset, but when the program run to the place calculate the loss at, it stop.

jwyang commented 8 years ago

what does 'stop' mean? just stuck or some errors occur?

frankwanL commented 8 years ago

I make a new folder named 'MyDataset' in datasets and put data4torch.h5 into it, then run the command 'th train.lua -dataset MyDataset -eta 0.9', then it show: torch/install/bin/luajit: cannot open models_def/MyDataset.lua: No such file or directory stack traceback: [C]: in function 'dofile' train.lua:146: in main chunk [C]: in function 'dofile' ...e/wl/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk [C]: at 0x00406670

jwyang commented 8 years ago

Hi,

you should also create a model file to define the network architecture for your dataset