What is the difference between register_parameter and register_buffer in PyTorch?

Pytorch doc for register_buffer() method reads This is typically used to register a buffer that should not to be considered a model parameter. For example, BatchNorm’s running_mean is not a parameter, but is part of the persistent state. As you already observed, model parameters are learned and updated using SGD during the training process. However, … Read more

Caffe didn’t see hdf5.h when compiling

What is the version of your Ubuntu install? Try this. In your Makefile.config try to append /usr/include/hdf5/serial/ to INCLUDE_DIRS: — INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include +++ INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/ and rename hdf5_hl and hdf5 to hdf5_serial_hl and hdf5_serial in the Makefile: — LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5 +++ LIBRARIES … Read more

Tensorflow: Cannot interpret feed_dict key as Tensor

This worked for me from keras import backend as K and after predicting my data i inserted this part of code then i had again loaded the model. K.clear_session() i faced this problem in production server, but in my pc it was running fine ……….. from keras import backend as K #Before prediction K.clear_session() #After … Read more

Tensorflow Slim: TypeError: Expected int32, got list containing Tensors of type ‘_Message’ instead

I got the same problem when using the 1.0 released and I could make it work without having to roll back on a previous version. The problem is caused by change in the api. That discussion helped me to find the solution: Google group > Recent API Changes in TensorFlow You just have to update … Read more

RNN Regularization: Which Component to Regularize?

Regularizers that’ll work best will depend on your specific architecture, data, and problem; as usual, there isn’t a single cut to rule all, but there are do’s and (especially) don’t’s, as well as systematic means of determining what’ll work best – via careful introspection and evaluation. How does RNN regularization work? Perhaps the best approach … Read more

Keras Maxpooling2d layer gives ValueError

Quoting an answer mentioned in github, you need to specify the dimension ordering: Keras is a wrapper over Theano or Tensorflow libraries. Keras uses the setting variable image_dim_ordering to decide if the input layer is Theano or Tensorflow format. This setting can be specified in 2 ways – specify ‘tf’ or ‘th’ in ~/.keras/keras.json like … Read more