Problem Summary In the following example, my NMT model has high loss because it correctly predicts target_input instead of target_output. As is evident, the prediction matches up almost 100% with target_input instead of target_output, as it should (off-by-one). Loss and gradients are being calculated using target_output, so it is strange that predictions are matching up to target_input. Model Overview An
Tag: machine-learning
Logistic Regression Gradient Descent [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question I have to do Logistic regression using batch gradient descent. The way I
Modifying the weights and biases of a restored CNN model in TensorFlow
I have recently started using TensorFlow (TF), and I have come across a problem that I need some help with. Basically, I’ve restored a pre-trained model, and I need to modify the weights and biases of one of its layers before I retest its accuracy. Now, my problem is the following: how can I change the weights and biases using
how to get covariance matrix in tensorflow?
How could I get covariance matrix in tensorflow? Like numpy.cov() in numpy. For example, I want to get covariance matrix of tensor A, now I have to use numpy instead Is there anyway to get cov by tensorflow instead of numpy? It is differnet from the problem how to compute covariance in tensorflow, where their problem is to compute covariance
Keras LSTM – why different results with “same” model & same weights?
(NOTE: Properly fixing the RNG state before each model creating as described in comment in comment practically fixed my problem, as within 3 decimals results are consistent, but they aren’t exactly so, so there’s somewhere a hidden source of randomness not fixed by seeding the RNG… probably some lib uses time milisecs or smth…if anyone has an idea on that,
How to run Pytorch model in normal non-parallel way?
I am going through this script, and there is a code block which takes 2 options into account, DataParallel and DistributedDataParallel here: What if I don’t want either of these options, and I want to run it without even DataParallel. How do I do it? How do I define my model so that it runs as a plain nn and
PyTorch Linear layer input dimension mismatch
Im getting this error when passing the input data to the Linear (Fully Connected Layer) in PyTorch: I fully understand the problem since the input data has a shape (N,C,H,W) (from a Convolutional+MaxPool layer) where: N: Data Samples C: Channels of the data H,W: Height and Width Nevertheless I was expecting PyTorch to do the “reshaping” of the data form:
Cross validation with grid search returns worse results than default
I’m using scikitlearn in Python to run some basic machine learning models. Using the built in GridSearchCV() function, I determined the “best” parameters for different techniques, yet many of these perform worse than the defaults. I include the default parameters as an option, so I’m surprised this would happen. For example: This is the same as the defaults, except max_depth
How do you compute accuracy in a regression model, after rounding predictions to classes, in keras?
How would you create and display an accuracy metric in keras for a regression problem, for example after you round the predictions to the nearest integer class? While accuracy is not itself effectively defined conventionally for a regression problem, to determine ordinal classes/labels for data, it is suitable to treat the problem as a regression. But then it would be
List of all classification algorithms [closed]
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 28 days ago. The community reviewed whether to reopen this question 28 days ago and left it closed: Original close reason(s) were not resolved Improve this