Home
Q&A
Education
Technology
Credit
General
Health
Insurance
Questions
Ask a Question
How to train images, when they have different size ?
Home
Education
How to train images, when they have different...
asked
Jan 24, 2022
in
Education
by
JackTerrance
I want my model to be trained with some classified images. They are of different sizes, so how can I train my model without resizing the images? Select the correct answer from above options
tensorflow
neural-network
deep-learning
1
Answer
0
votes
answered
Jan 24, 2022
by
JackTerrance
Best answer
@Ritik, you haven’t mentioned what architecture you are talking about so let us assume it’s a partly convolutional, partly connected network like AlexNet, GoogLeNet , etc. The answer to your question depends on the network type which you are working with. Let us assume you have a network which contains a lot of convolutional units and does not have any fully connected layers, so it can be invariant to the size of the input image. This type of network can process the input images and return another image as output. Remember to make sure that the output matches your expectation since you have to find the loss. If you are using fully connected units then it can be big trouble for you, following are some ways to solve your problem: Don’t care about the squashing of images. Centre-crop the images to a specific size. Pad the image with a solid color and then resize it Perform the combination of the above. visit here for examples:
https://github.com/tensorflow/models/blob/f98c5ded31d7da0c2d127c28b2c16f0307a368f0/slim/preprocessing/inception_preprocessing.py#L206-L216
Hope this answer helps!
Related questions
0
votes
Q: How to add regularizations in TensorFlow?
I read that regularization terms are implemented by manually adding an additional term to loss value in neural network ... it manually? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
deep-learning
neural-network
tensorflow
0
votes
Q: How to assign a value to a TensorFlow variable?
I want to assign a value to a TensorFlow variable in Python and I am using this: import tensorflow as tf import ... do to correct this? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
tensorflow
deep-learning
python
neural-network
0
votes
Q: Role of “Flatten” in Keras
I am trying to understand the role of the Flatten function in Keras. Below is my code, which is a simple two ... flatten it? Thanks! Select the correct answer from above options...
asked
Feb 8, 2022
in
Education
by
JackTerrance
machine-learning
deep-learning
tensorflow
neural-network
0
votes
Q: Role of “Flatten” in Keras
What is the role of Flatten in Keras. I am executing the code below and it's a two layered network. The ... output is already flat? Select the correct answer from above options...
asked
Jan 25, 2022
in
Education
by
JackTerrance
keras
neural-network
deep-learning
tensorflow
machine-learning
0
votes
Q: multi-layer perceptron (MLP) architecture: criteria for choosing number of hidden layers and size of the hidden layer?
If we have 10 eigenvectors then we can have 10 neural nodes in input layer.If we have 5 output classes then we ... in 1 hidden layer? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
machine-learning
neural-network
deep-learning
0
votes
Q: How to set layer-wise learning rate in Tensorflow?
I want different learning layers in different layers just like we do in Caffe. I just want to speed up the training ... can I do this? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
python
deep-learning
tensorflow
layers
0
votes
Q: Precision/recall for multiclass-multilabel classification
I'm wondering how to calculate precision and recall measures for multiclass multilabel classification, i.e. classification ... labels? Select the correct answer from above options...
asked
Jan 31, 2022
in
Education
by
JackTerrance
machine-learning
artificial-intelligence
scikit-learn
tensorflow
deep-learning
0
votes
Q: What does tf.nn.conv2d do in tensorflow?
I was looking at the docs of TensorFlow about tf.nn.conv2d here. But I can't understand what it does or ... it raised the question. Select the correct answer from above options...
asked
Jan 27, 2022
in
Education
by
JackTerrance
machine-learning
deep-learning
tensorflow
python
0
votes
Q: Gradient Descent vs Adagrad vs Momentum in TensorFlow
I am having problem in understanding the difference between three optimizers for loss.I went through some documents ... differences? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
tensorflow
deep-learning
0
votes
Q: Best way to save a trained model in PyTorch?
I am searching for the better option to save a trained model in PyTorch, these are the options I am using ... the above two functions? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
python
deep-learning
pytorch
tensorflow
0
votes
Q: What does tf.nn.embedding_lookup function do?
What does the following function do? Should I consider it as a lookup table like in skip-gram model? tf.nn. ... mod', name=None) Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
python
tensorflow
deep-learning
natural-language-processing
0
votes
Q: What is the difference between 'SAME' and 'VALID' padding in tf.nn.max_pool of tensorflow?
In tf.nn.max_pool of tensorflow what is the difference between 'SAME' and 'VALID'? I read in here that ... pool means in tensorflow? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
python
tensorflow
deep-learning
0
votes
Q: What does global_step mean in Tensorflow?
What is global_step ? why do we use '0' while setting up global_step? def training(loss,learning_rate): tf. ... global_step becomes 1? Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
deep-learning
tensorflow
0
votes
Q: keras: how to save the training history
I want to save the history to a file, in Keras I have model.fit history = model.fit(Q_train, W_train, ... =(Q_test, W_test)) Select the correct answer from above options...
asked
Jan 24, 2022
in
Education
by
JackTerrance
neural-network
deep-learning
keras
machine-learning
0
votes
Q: robot programming with lisp?
I'm looking for some examples of robot/AI programming using Lisp. Are there any good online examples available ... in nature)? Select the correct answer from above options...
asked
Feb 4, 2022
in
Education
by
JackTerrance
machine-learning
artificial-intelligence
neural-network
deep-learning
...