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
Tag: keras
Tensorflow: Error when trying transfer learning: Invalid JPEG data or crop window
I am trying to shape my own custom image dataset into the correct input shape for the pretrained MobileNet model on Tensorflow using their tutorial here. My code: After which I continue with the TF tutorial on transfer learning here. However, I ran into this problem where I suspect the JPEG image is corrupted or there is a lack of/problem
validation accuracy not improving
No matter how many epochs I use or change learning rate, my validation accuracy only remains in 50’s. Im using 1 dropout layer right now and if I use 2 dropout layers, my max train accuracy is 40% with 59% validation accuracy. And currently with 1 dropout layer, here’s my results: Again max, it can reach is 59%. Here’s the
Concatenate three inputs of different dimensions in Keras
I have two inputs of same size and then applied word embeddings of vector size 128 and then reshape it giving both inputs shape of (none,1,128), another input which is context has dimension (none,1,18), I want to concatenate these three inputs and then feed the combined output to an LSTM layer. But I am unable to concatenate the inputs as
How to efficiently assign to a slice of a tensor in TensorFlow
I want to assign some values to slices of an input tensor in one of my model in TensorFlow 2.x (I am using 2.2 but ready to accept a solution for 2.1). A non-working template of what I am trying to do is: of course when building this (AddToEven().build(tf.TensorShape([None, None]))) I get the following error: I can achieve this simple
How to use multiple inputs in Tensorflow 2.x Keras Custom Layer?
I’m trying to use multiple inputs in custom layers in Tensorflow-Keras. Usage can be anything, right now it is defined as multiplying the mask with the image. I’ve search SO and the only answer I could find was for TF 1.x so it didn’t do any good. Answer EDIT: Since TensorFlow v2.3/2.4, the contract is to use a list of
In Keras, can I use an arbitrary algorithm as a loss function for a network?
I has been trying to understand this machine learning problem for many days now and it really confuses me, I need some help. I am trying to train a neural network whose input is an image, and which generates another image as output (it is not a very large image, it is 8×8 pixels). And I have an arbitrary fancy_algorithm()
Does SHAP in Python support Keras or TensorFlow models while using DeepExplainer?
I am currently using SHAP Package to determine the feature contributions. I have used the approach for XGBoost and RandomForest and it worked really well. Since the data I am working on is a sequential data I tried using LSTM and CNN to train the model and then get the feature importance using the SHAP’s DeepExplainer; but it is continuously
Can CNN do better than pretrained CNN?
With all I know. pretrained CNN can do way better than CNN. I have a dataset of 855 images. I have applied CNN and got 94% accuracy.Then I applied Pretrained model (VGG16, ResNet50, Inception_V3, MobileNet)also with fine tuning but still i got highest 60% and two of them are doing very bad on classification. Can CNN really do better than
How to reproduce the Bottleneck Blocks in Mobilenet V3 with Keras API?
Using Keras API, I am trying to write the MobilenetV3 as explained in this article: https://arxiv.org/pdf/1905.02244.pdf with the architecture as described in this picture: For that, I need to implement the bottloneck_blocks from the previous article https://arxiv.org/pdf/1801.04381.pdf. See image for architecture: I managed to glue together the Initial and final Conv layers: Where the bottleneck_block is given in the next