deep-learning

Multi-Label Image Classification

假装没事ソ 提交于 2020-12-15 02:03:24
问题 I tried myself but couldn't reach the final point that's why posting here, please guide me. I am working in multi-label image classification and have slightly different scenarios. Actually I am confused, how we will map labels and their attribute with Id etc So we can use for training and testing. Here is code on which I am working import os import numpy as np import pandas as pd from keras.utils import to_categorical from collections import Counter from keras.callbacks import Callback from

Multi-Label Image Classification

夙愿已清 提交于 2020-12-15 02:01:38
问题 I tried myself but couldn't reach the final point that's why posting here, please guide me. I am working in multi-label image classification and have slightly different scenarios. Actually I am confused, how we will map labels and their attribute with Id etc So we can use for training and testing. Here is code on which I am working import os import numpy as np import pandas as pd from keras.utils import to_categorical from collections import Counter from keras.callbacks import Callback from

Multi-Label Image Classification

陌路散爱 提交于 2020-12-15 02:01:12
问题 I tried myself but couldn't reach the final point that's why posting here, please guide me. I am working in multi-label image classification and have slightly different scenarios. Actually I am confused, how we will map labels and their attribute with Id etc So we can use for training and testing. Here is code on which I am working import os import numpy as np import pandas as pd from keras.utils import to_categorical from collections import Counter from keras.callbacks import Callback from

Why I'm getting zero accuracy in Keras binary classification model?

大兔子大兔子 提交于 2020-12-13 04:50:51
问题 I have a Keras Sequential model taking inputs from csv files. When I run the model, its accuracy remains zero even after 20 epochs. I have gone through these two stackoverflow threads (zero-accuracy-training and why-is-the-accuracy-for-my-keras-model-always-0) but nothing solved my problem. As my model is binary classification, and I think it should not work like a regression model to make accuracy metric ineffective. Here is the Model def preprocess(*fields): return tf.stack(fields[:-1]), tf

Why is ValueError thrown by keras.models.model_from_config() in the Keras-to-Tensorflow exporting example?

别等时光非礼了梦想. 提交于 2020-12-13 04:20:37
问题 The Keras website has this article about exporting Keras models to core Tensorflow. However the step new_model = model_from_config(config) throws an error: Traceback (most recent call last): File "/home/hal9000/tf_serving_experiments/sndbx.py", line 38, in <module> new_model = model_from_config(config) File "/home/hal9000/keras2env/local/lib/python2.7/site-packages/keras/models.py", line 304, in model_from_config return layer_module.deserialize(config, custom_objects=custom_objects) File "

Poor Result with BatchNormalization

↘锁芯ラ 提交于 2020-12-13 03:43:49
问题 I have been trying to implement the DCGan, the face book's paper, and blocked by below two issues almost for 2 weeks. Any suggestions would be appreciated. Thanks. Issue 1: DCGAN paper suggest to use BN(Batch Normalization) both the generator and discriminator. But, I couldn't get better result with BN rather than w/out BN. I copied DCGAN model I used which is exactly the same with a DCGAN paper. I don't think it is due to overfitting. Because (1) It keeps showing the noise the same with an

Poor Result with BatchNormalization

本秂侑毒 提交于 2020-12-13 03:43:44
问题 I have been trying to implement the DCGan, the face book's paper, and blocked by below two issues almost for 2 weeks. Any suggestions would be appreciated. Thanks. Issue 1: DCGAN paper suggest to use BN(Batch Normalization) both the generator and discriminator. But, I couldn't get better result with BN rather than w/out BN. I copied DCGAN model I used which is exactly the same with a DCGAN paper. I don't think it is due to overfitting. Because (1) It keeps showing the noise the same with an

Understanding the values of summary() (Output Shape, Param#)?

混江龙づ霸主 提交于 2020-12-12 09:10:30
问题 I'm checking the output of summary function and don't understand all the printed values. For example, look on this simple code: x = [1, 2, 3, 4, 5] y = [1.2, 1.8, 3.5, 3.7, 5.3] model = Sequential() model.add(Dense(10, input_dim=1, activation='relu')) model.add(Dense(30, input_dim=1, activation='relu')) model.add(Dense(10, input_dim=1, activation='relu')) model.add(Dense(1)) model.summary() The output: Model: "sequential" _________________________________________________________________ Layer

Should a data batch be moved to CPU and converted (from torch Tensor) to a numpy array when doing evaluation w.r.t. a metric during the training?

落花浮王杯 提交于 2020-12-12 01:51:55
问题 I am going through Andrew Ng’s tutorial from the CS230 Stanford course, and in every epoch of the training, evaluation is performed by calculating the metrics. But before calculating the metrics, they are sending the batches to CPU and converting them to numpy arrays (code here). # extract data from torch Variable, move to cpu, convert to numpy arrays output_batch = output_batch.data.cpu().numpy() labels_batch = labels_batch.data.cpu().numpy() # compute all metrics on this batch summary_batch

ValueError: Failed to convert a NumPy array to a Tensor (Unsupported object type numpy.ndarray). in trying to predict tesla stock

♀尐吖头ヾ 提交于 2020-12-11 08:51:23
问题 In the end you can see that i have tried converting this into a numpy array but I don't understand why tensorflow dosen't support it? I have looked at the other related pages but none seemed to help. Is there some other format i have to do to the data in order to properly fit in model? this is what keras says: x Vector, matrix, or array of training data (or list if the model has multiple inputs). If all inputs in the model are named, you can also pass a list mapping input names to data. x can