deep-learning

Items of feature_columns must be a _FeatureColumn

心已入冬 提交于 2021-02-20 12:01:13
问题 I am getting this error: ValueError: Items of feature_columns must be a _FeatureColumn. Given (type ): Index(['CreditScore', 'Age', 'Tenure', 'Balance', 'NumOfProducts', 'HasCrCard', 'IsActiveMember', 'EstimatedSalary', 'Exited'], dtype='object'). I am using tensorFlow lib. I want to get prediction results but I can not run m.train(input_fn=get_input_fn ,steps=5000) code. I always got the same error whatever I did. I used these input functions in the following but nothing changed. def input

Convert an rgb mask image to coco json polygon format

吃可爱长大的小学妹 提交于 2021-02-20 02:48:02
问题 I annotated images using PixelAnnotationTool provided here: https://github.com/abreheret/PixelAnnotationTool and using the provided dictionary: { "labels": { "unlabeled": { "categorie": "void", "color": [ 0, 0, 0 ], "id": 0, "id_categorie": 0, "name": "unlabeled" }, "bicycle_motorcycle": { "categorie": "bicycle_motorcycle", "color": [ 119, 11, 32 ], "id": 1, "id_categorie": 1, "name": "bicycle_motorcycle" }, "bus": { "categorie": "bus", "color": [ 102, 51, 0 ], "id": 2, "id_categorie": 2,

Convert an rgb mask image to coco json polygon format

前提是你 提交于 2021-02-20 02:46:09
问题 I annotated images using PixelAnnotationTool provided here: https://github.com/abreheret/PixelAnnotationTool and using the provided dictionary: { "labels": { "unlabeled": { "categorie": "void", "color": [ 0, 0, 0 ], "id": 0, "id_categorie": 0, "name": "unlabeled" }, "bicycle_motorcycle": { "categorie": "bicycle_motorcycle", "color": [ 119, 11, 32 ], "id": 1, "id_categorie": 1, "name": "bicycle_motorcycle" }, "bus": { "categorie": "bus", "color": [ 102, 51, 0 ], "id": 2, "id_categorie": 2,

How to detect source of under fitting and vanishing gradients in pytorch?

南笙酒味 提交于 2021-02-20 01:59:32
问题 How to detect source of vanishing gradients in pytorch? By vanishing gradients, I mean then the training loss doesn't go down below some value, even on limited sets of data. I am trying to train some network, and I have the above problem, in which I can't even get the network to over fit, but can't understand the source of the problem. I've spent a long time googling this, and only found ways to prevent over fitting, but nothing about under fitting, or specifically, vanishing gradients. What

How to detect source of under fitting and vanishing gradients in pytorch?

瘦欲@ 提交于 2021-02-20 01:58:15
问题 How to detect source of vanishing gradients in pytorch? By vanishing gradients, I mean then the training loss doesn't go down below some value, even on limited sets of data. I am trying to train some network, and I have the above problem, in which I can't even get the network to over fit, but can't understand the source of the problem. I've spent a long time googling this, and only found ways to prevent over fitting, but nothing about under fitting, or specifically, vanishing gradients. What

Adding batch normalization decreases the performance

∥☆過路亽.° 提交于 2021-02-19 09:08:53
问题 I'm using PyTorch to implement a classification network for skeleton-based action recognition. The model consists of three convolutional layers and two fully connected layers. This base model gave me an accuracy of around 70% in the NTU-RGB+D dataset. I wanted to learn more about batch normalization, so I added a batch normalization for all the layers except for the last one. To my surprise, the evaluation accuracy dropped to 60% rather than increasing But the training accuracy has increased

Adding batch normalization decreases the performance

大憨熊 提交于 2021-02-19 09:04:01
问题 I'm using PyTorch to implement a classification network for skeleton-based action recognition. The model consists of three convolutional layers and two fully connected layers. This base model gave me an accuracy of around 70% in the NTU-RGB+D dataset. I wanted to learn more about batch normalization, so I added a batch normalization for all the layers except for the last one. To my surprise, the evaluation accuracy dropped to 60% rather than increasing But the training accuracy has increased

How does the Tensorflow's TripletSemiHardLoss and TripletHardLoss and how to use with Siamese Network?

半腔热情 提交于 2021-02-19 08:37:18
问题 As much as I know that Triplet Loss is a Loss Function which decrease the distance between anchor and positive but decrease between anchor and negative. Also, there is a margin added to it. So for EXAMPLE LEt us Suppose: a Siamese Network , which gives embeddings: anchor_output = [1,2,3,4,5...] # embedding given by the CNN model positive_output = [1,2,3,4,4...] negative_output= [53,43,33,23,13...] And I think I can get the triplet loss such as: (I think I have to make it as loss using Lambda

TensorFlow: Is there a way to locate the filenames of images encoded into TFRecord files?

∥☆過路亽.° 提交于 2021-02-19 08:11:07
问题 I am wondering if the filename information of the image encoded could be encoded into a TFRecord file while creating the tfrecord files, and if so, how could this information be decoded back? When decoded, is the filename a Tensor object? 回答1: Just like fabrizioM said, you have to store the sources in the tfrecords file if you want to use them. Here is an example: #!/usr/bin/env python """Example for reading and writing tfrecords.""" import tensorflow as tf from PIL import Image import numpy

How to balance the generator and the discriminator performances in a GAN?

自闭症网瘾萝莉.ら 提交于 2021-02-19 08:06:26
问题 It's the first time I'm working with GANs and I am facing an issue regarding the Discriminator repeatedly outperforming the Generator. I am trying to reproduce the PA model from this article and I'm looking at this slightly different implementation to help me out. I have read quite a lot of papers on how GANs work and also followed some tutorials to understand them better. Moreover, I've read articles on how to overcome the major instabilities, but I can't find a way to overcome this behavior