What is the number of filter in CNN?

I am currently seeing the API of theano, theano.tensor.nnet.conv2d(input, filters, input_shape=None, filter_shape=None, border_mode=’valid’, subsample=(1, 1), filter_flip=True, image_shape=None, **kwargs) where the filter_shape is a tuple of (num_filter, num_channel, height, width), I am confusing about this because isn’t that the number of filter decided by the stride while sliding the filter window on the image? How can … Read more

Logo recognition in images [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 6 years ago. Improve this question Does anyone know of recent academic work which has been done on logo recognition in images? Please answer only … Read more

How are neural networks used when the number of inputs could be variable?

All the examples I have seen of neural networks are for a fixed set of inputs which works well for images and fixed length data. How do you deal with variable length data such sentences, queries or source code? Is there a way to encode variable length data into fixed length inputs and still get … Read more

Dummy variables when not all categories are present

I have a set of dataframes where one of the columns contains a categorical variable. I’d like to convert it to several dummy variables, in which case I’d normally use get_dummies. What happens is that get_dummies looks at the data available in each dataframe to find out how many categories there are, and thus create … Read more

How to log Keras loss output to a file

When you run a Keras neural network model you might see something like this in the console: Epoch 1/3 6/1000 […………………………] – ETA: 7994s – loss: 5111.7661 As time goes on the loss hopefully improves. I want to log these losses to a file over time so that I can learn from them. I have … Read more

How to find the corresponding class in clf.predict_proba()

I have a number of classes and corresponding feature vectors, and when I run predict_proba() I will get this: classes = [‘one’,’two’,’three’,’one’,’three’] feature = [[0,1,1,0],[0,1,0,1],[1,1,0,0],[0,0,0,0],[0,1,1,1]] from sklearn.naive_bayes import BernoulliNB clf = BernoulliNB() clf.fit(feature,classes) clf.predict_proba([0,1,1,0]) >> array([[ 0.48247836, 0.40709111, 0.11043053]]) I would like to get what probability that corresponds to what class. On this page it … Read more

Save MinMaxScaler model in sklearn

I’m using the MinMaxScaler model in sklearn to normalize the features of a model. training_set = np.random.rand(4,4)*10 training_set [[ 6.01144787, 0.59753007, 2.0014852 , 3.45433657], [ 6.03041646, 5.15589559, 6.64992437, 2.63440202], [ 2.27733136, 9.29927394, 0.03718093, 7.7679183 ], [ 9.86934288, 7.59003904, 6.02363739, 2.78294206]] scaler = MinMaxScaler() scaler.fit(training_set) scaler.transform(training_set) [[ 0.49184811, 0. , 0.29704831, 0.15972182], [ 0.4943466 , 0.52384506, … Read more