Monday, July 27, 2015

Working with Torch7 in Ubuntu 14.04

Training an Object Classifier in Torch-7 on multiple GPUs over ImageNet

How to retrain a trained model with more detailed information?!topic/torch7/nuecUMknfSg

Negative loss when finetune model that is loaded using loadcaffe

@szagoruyko does loadcaffe still work with the latest caffe models? i'm getting "Message type "caffe.NetParameter" has no field named "layer"" ... it doesn't error out, but the result is negative loss function evaluations     
@patrickhop these have to work. do you remove softmax and put logsoftmax instead?     
do you want to fine-tune? If you know how to use torch, fine-tuning is pretty natural, there's nothing you have to do special except initialize with a pre-trained model (available via loadcaffe)

How to get a layer from a caffe model using torch?

GoogleNet not training?
Add batch normalization or initialize weights with Xavier technique
How to load trained weights?!topic/torch7/fcy0-5v6M08

How to retrain a trained model with more detailed information?!topic/torch7/nuecUMknfSg

Clean up before saving torch model

Install fbcunn

      Workaround for installing fbthrift

- Install manually
- Use folly v.047.0 as advised in
- Remember to 'sudo make install' and 'sudo ldconfig' after folly was 'make'
- Edit file configure:
    if test "x$want_folly" = "xyes"; then
    if test "x$want_folly" = "xyes"; then
- Edit files in thrift/lib/cpp2:
extern int FLAGS_thrift_cpp2_protocol_reader_string_limit;
extern int FLAGS_thrift_cpp2_protocol_reader_container_limit;

      in thrift/lib/cpp/util/kerberos:
//  thrift_cc_manager_kill_switch_file,
//  "/var/thrift_security/disable_cc_manager",
//  "A file, which when present, acts as a kill switch for and disables the cc "
//  " manager thread running on the host.");
std::string FLAGS_thrift_cc_manager_kill_switch_file="/var/thrift_security/disable_cc_manager";
   For more information:

- Do 'make' and 'sudo make install' and 'sudo ldconfig' in fbthrift/thrift

Error 1:

Error: Failed installing dependency: - Could not find expected file openssl/evp.h, or openssl/evp.h for OPENSSL -- you may have to install OPENSSL in your system and/or pass OPENSSL_DIR or OPENSSL_INCDIR to the luarocks command. Example: luarocks install luacrypto OPENSSL_DIR=/usr/local

Fix 2:

sudo apt-get install libssl1.0.0 libssl-dev

Error 2:
th> require 'cudnn'...ubuntu/torch-distro/install/share/lua/5.1/trepl/init.lua:319: .../ubuntu/torch-distro/install/share/lua/5.1/cudnn/ffi.lua:385: /usr/local/cuda/lib64/ undefined symbol: cudnnGetVersion
Checked /usr/local/cuda/lib64/, it does exist and seems nothing wrong.

Fix 2:

You downloaded cudnn R1. The bindings are for cudnn R2. Download R2 and you won't see this error.!topic/torch7/vhgk8fGa7Ic 

Error 3:
field weight is not a torch.CudaTensor

The model's type is not the same as the input type in my case.
model = model:cuda()
input = input:cuda()
output = model:forward(input)!topic/torch7/gq1x6t_TJ7g

Error 4: cannot open shared object file: No such file or directory

Fix 4:
Install graphicsmagick lib:sudo apt-get install libgraphicsmagick1-dev

No comments:

Post a Comment