# Tag Info

0

Using TensorFlow(Keras), you can get a simple graph of the model by running model.summary(). Or, you can use TensorBoard to get more "better looking" graphs which, to be honest I never used but looks good.

1

These performance values are inconsistent, this is definitely not normal. The whole dataset is made of the training set, the validation set and the test set. Accuracy is the proportion of correctly labelled instances, so accuracy on the whole dataset is: $$accu_{full}= 0.8 * accu_{train} + 0.1 * accu_{val} + 0.1 * accu_{test}$$ Since \$0.8 * 0.99 + 0.1 * 0.99 ...

0

I don't think what you want to do can be done by a pooling layer, but it might be possible by using a "convolutional layer" with 32 filters. You need to use proper padding and stride, such as discussed in this post to preserve size. And if you want to mimic pooling, you may need to use a custom layer with no activation function (or linear ...

0

Just for fun, run this for long generative output. Here is some code to put at the end. Also, you may want to change it to n-tuples or ngrams. This is a nice toy language model! output_str = [] with torch.no_grad(): context = ngrams[0][0][:] # Getting context and target index's context_idxs = torch.tensor([word_to_ix2[w] for w in context], dtype=torch....

0

Took a bit of time, but I understand what I was asking. The process of kNN is to find the nearest "majority" major (determined by param k). My misunderstanding came from interpreting what the training set was being used for. The training set and the test set both are mapped in the same feature space. To classify the test set images, a distance (...

0

You can't concatenate these two arrays, because their shapes don't match. You could concatenate them if you had: 1) a.shape = (1, 30, 1220) b.shape = (1, 30, 256) a.shape = (1, 30, 1220) b.shape = (1, 128, 1220) or eventually 3) a.shape = (1, 30, 1220) b.shape = (1, 128, 30) a.shape = (1, 30, 1220) b.shape = (1, 1220, 256)

2

You can add a conv layer before the pre-trained model (like an adapter) The added conv layer will be defined to match your input size and produce output that matches the original input size of the pre-trained model (you probably need to train the new first layer) first_conv_layer = [nn.Conv2d(2, 3, kernel_size=3, stride=1, padding=1, dilation=1, groups=1, ...

Top 50 recent answers are included