deep-learning

Plot validation loss in Tensorflow Object Detection API

江枫思渺然 提交于 2021-02-08 03:27:02
问题 I'm using Tensorflow Object Detection API for detection and localization of one class object in images. For these purposes I use pre-trained faster_rcnn_resnet50_coco_2018_01_28 model. I want to detect under/overfitting after training of the model. I see training loss, but after evaluating Tensorboard only shows mAP and Precision metrics and no loss. Is this possible to plot a validation loss on Tensorboard too? 回答1: There is validation loss. Assuming you're using the latest API, the curve

Plot validation loss in Tensorflow Object Detection API

删除回忆录丶 提交于 2021-02-08 03:26:27
问题 I'm using Tensorflow Object Detection API for detection and localization of one class object in images. For these purposes I use pre-trained faster_rcnn_resnet50_coco_2018_01_28 model. I want to detect under/overfitting after training of the model. I see training loss, but after evaluating Tensorboard only shows mAP and Precision metrics and no loss. Is this possible to plot a validation loss on Tensorboard too? 回答1: There is validation loss. Assuming you're using the latest API, the curve

Get the loss that a given optimizer is minimizing in Tensorflow

冷暖自知 提交于 2021-02-07 14:49:42
问题 I am working in a unit test system for my tensorflow workspace and I would like to know if there is any method or attribute, given a graph with an optimizer operation (after calling .minimize()), to obtain the final loss tensor that it is optimizing and the variables that it controls. For example if I call train_op = tf.train.AdamOptimizer(1e-4).minimize(cross_entropy) I would like to retrieve cross_entropy only having access to train_op. I have access to the train_op object, I only want to

How to experiment with custom 2d-convolution kernels in Keras?

微笑、不失礼 提交于 2021-02-07 14:33:25
问题 In a default Conv2D layer with kernel_size=3 the weights of a slice of one of the filters could be named like this: A B C D E F G H I With kernel_size=5 like this: A B C D E F G H I J K L M N O P Q R S T U V W X Y Now I'd like to build (and train/test) a model based on conv layers with kernels like that: A A B C C A A B C C D D E F F G G H I I G G H I I How could the implementation of such a custom layer look like? 回答1: Maybe like this? class CustomConv2D(Layer): def __init__(self, filters, *

How to monitor validation loss in the training of estimators in TensorFlow?

拥有回忆 提交于 2021-02-07 13:22:47
问题 I want to ask a question about how to monitor validation loss in the training process of estimators in TensorFlow. I have checked a similar question (validation during training of Estimator) asked before, but it did not help much. If I use estimators to build a model, I will give an input function to the Estimator.train() function. But there is no way to add another validation_x, and validation_y data in the training process. Therefore, when the training started, I can only see the training

Keras Lambda Layer for matrix vector multiplication

纵然是瞬间 提交于 2021-02-07 10:30:54
问题 I am trying to have a lambda layer in keras that performs a vector matrix multiplication, before passing it to another layer. The matrix is fixed (I don't want to learn it). Code below: model.add(Dropout(0.1)) model.add(Lambda(lambda x: x.dot(A))) model.add(Dense(output_shape, activation='softmax')) model.compile(<stuff here>)} A is the fixed matrix, and I want to do x.dot(A) WHen I run this, I get the following error: 'Tensor' object has no attribute 'dot' Same Error when I replace dot with

Keras Lambda Layer for matrix vector multiplication

江枫思渺然 提交于 2021-02-07 10:30:00
问题 I am trying to have a lambda layer in keras that performs a vector matrix multiplication, before passing it to another layer. The matrix is fixed (I don't want to learn it). Code below: model.add(Dropout(0.1)) model.add(Lambda(lambda x: x.dot(A))) model.add(Dense(output_shape, activation='softmax')) model.compile(<stuff here>)} A is the fixed matrix, and I want to do x.dot(A) WHen I run this, I get the following error: 'Tensor' object has no attribute 'dot' Same Error when I replace dot with

How to extract text region from an image after detecting

天大地大妈咪最大 提交于 2021-02-07 09:24:49
问题 I am trying to extract all text regions from an image using opencv python. I have successfully detected the text regions but could not extract it. I extracted the smaller sub-matrices of a text region but I cannot aggregrate them into a bigger matrix that we see as the text region in the image. import numpy as np import cv2 from imutils.object_detection import non_max_suppression import matplotlib.pyplot as plt %matplotlib inline from PIL import Image # pip install imutils image1 = cv2.imread

How to use TensorBoard and summary operations with the tf.layers module

只愿长相守 提交于 2021-02-07 09:18:08
问题 I have followed the TensorFlow Layers tutorial to create a CNN for MNIST digit classification using TensorFlow's tf.layers module. Now I'm trying to learn how to use TensorBoard from TensorBoard: Visualizing Learning. Perhaps this tutorial hasn't been updated recently, because it says its example code is a modification of that tutorial's and links to it, but the code is completely different: it manually defines a single-hidden-layer fully-connected network. The TensorBoard tutorial shows how

How to use TensorBoard and summary operations with the tf.layers module

不想你离开。 提交于 2021-02-07 09:17:59
问题 I have followed the TensorFlow Layers tutorial to create a CNN for MNIST digit classification using TensorFlow's tf.layers module. Now I'm trying to learn how to use TensorBoard from TensorBoard: Visualizing Learning. Perhaps this tutorial hasn't been updated recently, because it says its example code is a modification of that tutorial's and links to it, but the code is completely different: it manually defines a single-hidden-layer fully-connected network. The TensorBoard tutorial shows how