How to create bounding boxes around the ROIs using keras [closed] - python

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 5 years ago.
Improve this question
I have to questions regarding keras and Convolutional Neural Networks:
1.
How to create bounding boxes using keras and convolution neural network ?
2.
How to use keras vgg16 application retraining?

Related

What is best optimizer for Classify images of clothing [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I try to use Keras library in python. Definitely this example https://www.tensorflow.org/tutorials/keras/classification.
What is best loss,hyper parameters and optimizer for this example?
You can look up any standard example such as MNIST classification for reference.
Usually for classification cross entropy loss is used. The optimizer is subjective and depends on the problem. SGD and Adam are common.
For LR you can start with 10^(-3) and keep reducing if the validation loss doesn't decrease after a certain number of iterations.

Tensorflow - What is the reason of difference between train size and trained values [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I have an excel file with 1000 different values, I am trying to train my artificial intelligence with these values. While the Test Size is 0.33, artificial intelligence should be trained with 670 values, but only 21 values ​​are trained. What is the source of the problem?
You probably mean a number of batches trained using fit. Every batch comprises 32 items by default

neural networks in pytorch [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 2 years ago.
Improve this question
I am using pytorch and need to implement this as a part of a neural network. Is there a particular way to code the layers shown in purple (s
def forward(self, images: torch.Tensor) -> torch.Tensor:
x= self.fc1(x)
return x
Combining all my comments into the answer.
To split the output vector from the first layer, which has a shape [batch_size, 4608], you can use torch.split function as follows
batch = torch.zeros((10, 4608))
sub_batch_1, sub_batch_2 = torch.split(batch, 2304, dim=1)
print(sub_batch_1.shape, sub_batch_2.shape)
This code results in two tensors
(torch.Size([10, 2304]), torch.Size([10, 2304]))
I am not sure about MAX logic you need. If it is about getting the maximum element in a given position from two tensors obtained during split, then torch.maximum function can be used to do so.

tf-agent, QNetwork => DqnAgent w/ tfa.optimizers.CyclicalLearningRate [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 2 years ago.
Improve this question
Is there an easy native way to implement tfa.optimizers.CyclicalLearningRate w/ QNetwork on DqnAgent?
Trying to avoid writing my own DqnAgent.
I guess the better question might be, what is a proper way to implement callbacks on DqnAgent?
From the tutorial you linked, the part where they set the optimizer is
optimizer = tf.compat.v1.train.AdamOptimizer(learning_rate=learning_rate)
train_step_counter = tf.Variable(0)
agent = dqn_agent.DqnAgent(
train_env.time_step_spec(),
train_env.action_spec(),
q_network=q_net,
optimizer=optimizer,
td_errors_loss_fn=common.element_wise_squared_loss,
train_step_counter=train_step_counter)
agent.initialize()
So you can replace optimizer with whatever optimizer you would rather use. Based on the documentation something like
optimizer = tf.keras.optimizers.Adam(learning_rate=tfa.optimizers.CyclicalLearningRate)
should work, barring any potential compatibility issues coming from that they are using the tf 1.0 adam in the tutorial.

Is it possible to integrate the deep learning neural network built in python into MATLAB code? [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 3 years ago.
Improve this question
I am wondering if there is a way to link the deep neural network built in python and use it in MATLAB code? for example, suppose I built a deep neural network as a function in python, so I need to call it in MATLAB code as a function in order to used it with MATLAB. Is that possible? if so, anyone can provide me a guidance or the steps to do that.
thank you
You can import pretrained networks in MATLAB if you have access to the Deep Learning Toolbox.
You can use the importKerasNetwork function for Tensorflow-Keras networks, importCaffeNetwork for Caffe networks or importONNXNetwork for ONNX networks.

Categories

Resources