Questions tagged [tensorflow]

TensorFlow is an open source library for machine learning and machine intelligence. TensorFlow uses data flow graphs with tensors flowing along edges. For details, see https://www.tensorflow.org. TensorFlow is released under an Apache 2.0 License.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

How to get same accuracy with identical models in Keras and Tensorflow?

As we all know Keras backend uses Tensorflow and so it should give out same kind of results when we provide same parameters, hyper-parameters, weights and biases initialisation at each layer, but ...
0
votes
0answers
18 views

TypeError: unhashable type: 'numpy.ndarray''

When I tried to execute the below code for epoch in range(training_epochs): sess.run(training_step, feed_dict={x:train_x,y:train_y}) the following error is ...
0
votes
1answer
12 views

How to get Keras accuracy for each step in an epoch like in Tensorflow?

Like in tensorflow I get accuracy for each step - ...
1
vote
0answers
17 views

Tensorflow and Keras model having same parameters, hyperparameters, weight and bias initialization give different accuracy?

I have made sure that layers,parameters, hyperparameters,kernel_initialization, bias_initialization, seed and dataset are all equal. But still the output for both the models are different. ...
1
vote
0answers
18 views

Would writing a decision tree algorithm in Pytorch or Tensorflow be faster than with Numpy?

Since these libraries can turn CPU arrays into GPU tensors, could you parallelize (and therefore accelerate) the calculations for a decision tree? I am considering making a decision tree class written ...
0
votes
0answers
5 views

WGAN-GP slow critic training time

I am implementing WGAN-GP using Tensorflow 2.0, but each training iteration of the critic is very slow (about 4 secs on my CPU, and somehow 9 secs on Colab GPU). Is WGAN-GP usually this slow or ...
-2
votes
0answers
17 views

How do I implement the following type of convolution (see picture)? [on hold]

I want to use the following type of convolution in my neural network. Is this a 1-D convolution? How do I implent it in keras / tensorlfow?
0
votes
0answers
27 views

Trying to train Stylegan, stopping with errors after first tick

I'm just getting started with GANs and have prepared a dataset for Stylegan of around 5500 256x256 images to train it on. I've pored through the scant resources outlining the training process and have ...
1
vote
0answers
11 views

Object coordinate detection with capsNet

Where can I find the implementation of object coordinate extraction with capsule networks in keras or pytorch?
0
votes
0answers
20 views

Training on huge data

I'm trying to find a code with n output bits and k input bits. The criterion for the code is that the minimum hamming distance ...
4
votes
2answers
42 views

Trained Tensorflow model performs poorly on inference

I trained an image classification model using Keras with Tensorflow backend. The model got good accuracy on validation dataset as well as on the testing data, I save the entire model to ...
0
votes
0answers
36 views

How to determine a shape of input and output nodes in graph. (Tensorflow C++)

At first, I tried to implement the following pipeline: 1a) I converted the model from keras (.hdf5) to tensorflow (.pb) and saved using the ...
0
votes
0answers
8 views

pass tf.data.Dataset to input layer in tf.keras functional api in LSTM models

While trying to use an Input layer prior to embedding layer in Keras functional design model, the Batch dimensions are not ignored by input layer automatically. Here is my ...
-1
votes
1answer
12 views

Fine-tuning a Pre-trained model (Resnet50) do I need to validate it or just train it?

When fine-tuning a Resnet50 model should I do the standard train validation split and train like any normal CNN or should I just do the training and not the validation if I am going to use this model ...
-2
votes
1answer
36 views

Keras error “Failed to find data adapter that can handle input” while trying to train a model

I've been following a tutorial on training a model and I've stumbled across an error that I've been struggling to find a solution for. The code for the model training is bellow: ...
0
votes
0answers
7 views

MASK RCNN with multicalss classification

I want to create a model which solve a multiclass classification problem. The main concept is: every picture contain only one object the background is very simple all object is coming from the same ...
2
votes
2answers
30 views

Why does accuracy remain the same

I'm new to machine learning and I try to create a simple model myself. The idea is to train a model that predicts if a value is more or less than some threshold. I generate some random values before ...
0
votes
1answer
18 views

Why the Logistic regression model trained with tensorflow performed so poor

I trained a logistic regression model with tensorflow but the accuracy of the model was so poor (accuracy = 0.68). The model was trained using simulated dataset and the result should be very good. is ...
0
votes
0answers
4 views

Load pretrained embedding model on TF-Hub to calculate Word Mover's Distance (WMD) on Gensim or spaCy

I'd like to calculate Word Mover's Distance with Universal Sentence Encoder on TensorFlow Hub embedding. I have tried the example on spaCy for WMD-relax, which loads 'en' model from spaCy, but I ...
0
votes
1answer
12 views

Where is the majority of Tensorflow memory usage?

Trying to wrap my head around where Tensorflow starts to use a lot of memory. If I have a batch_size=10 and my ...
0
votes
1answer
25 views

Understanding the “Wide” part of Google's wide and deep

Google's wide and deep recommender model sounds really cool, but I'm struggling to believe I'm grasping the wide section right so wanted to check my understanding. Their paper says the following: ...
0
votes
0answers
11 views

How to implement the function of getYourInputImage()?

I'm working on eye detection project and I have trained my own model using Tensorflow Library, I have now the Tensorflow lite model. I followed the documentation proposed by Tensorflow for how to ...
2
votes
2answers
32 views

How to create custom Activation functions in Keras / TensorFlow?

I'm using keras and I wanted to add my own activation function myf to tensorflow backend. how to define the new function and make it operational. so instead of the line of code: ...
0
votes
1answer
12 views

Is 25-75 a good case-control ratio for a neural network?

I have 50,000 DNA samples from a biobank. Only 2,200 samples have the label (disease) that I want to work with for supervised learning in a neural network. So my question is, how many of those non-...
-2
votes
0answers
17 views

best pre trained tensorflow model for discriminating different faces?

I have two sets of faces which i'd like a neural network to learn and discriminate. What kind of model or network is best suited for this job? Anyone with experience?
0
votes
1answer
35 views

How to disable GPU with TensorFlow?

Using tensorflow-gpu 2.0.0rc0. I want to choose whether it uses the GPU or the CPU.
0
votes
0answers
48 views

Inconsistent inference results in deeplab v3+

I trained and exported the model as suggested in :https://github.com/tensorflow/models/tree/master/research/deeplab. The validation results saved using vis.py are fine but when I apply demo code for ...
0
votes
0answers
19 views

How to use TimeDistributed fo CNN+LSTM?

I am trying to classify 6 classes time-frequency domain signal (STFT spectrogram) with a size of 3601x217 pixels. Assume that for each classes have 70 training samples, 20 validation samples, and 10 ...
0
votes
2answers
52 views

Weighted Binary Cross Entropy Loss — Keras Implementation

I have a binary segmentation problem with highly imbalanced data such that there are almost 60 class zero samples for every class one sample. To address this issue, I coded a simple weighted binary ...
0
votes
2answers
34 views

What can be the cause of a sudden explosion in the loss when training a CNN (Deeplab)

I am training the following deeplab CNN: https://github.com/tensorflow/models/tree/master/research/deeplab During training I see the following loss: The first 50k steps of the training the loss is ...
0
votes
0answers
8 views

Set the number of iterations gpt-2

I'm fine tunning a gpt-2 model following this tutorial: https://medium.com/@ngwaifoong92/beginners-guide-to-retrain-gpt-2-117m-to-generate-custom-text-content-8bb5363d8b7f With is associated GitHub ...
0
votes
1answer
17 views

How to derive association from a regression model?

I understand how to make predictions with a trained neural network model that uses loss=binary_crossentropy and a 1-node ...
1
vote
1answer
20 views

Evaluating pairwise distances between the output of a tf.keras.model

I am trying to create a custom loss function in tensorflow. I am using tensorflow v2.0.rc0 for running the code. Following is the code and the function min_dist_loss...
0
votes
0answers
4 views

Error while installing grpcio while installing tensorflow in Linux

I am trying to install tensorflow in my linux VM through VNC. I am getting an environment error for some reason. ...
1
vote
1answer
20 views

What is the branch of data science that deals with generating data? Looking for tutorials

So far all the tutorials (Python/Tensorflow) I have been following dealt with processing the data, they are classification problems. Things that give Yes or No answers. Now I want to find tutorials on ...
0
votes
1answer
22 views

Speed of training decrease by adding more GPUs

I am using the distributed Tensorflow with Mirror Strategy. I am training the VGG16 based on custom Estimator. However, by increasing the number of GPUs time of training is increased. As I check, the ...
0
votes
0answers
38 views

Convert YoloV3 output to coordinates of bounding box, label and confidence

I run YoloV3 model and get detections - dictionary of 3 entries: "detector/yolo-v3/Conv_22/BiasAdd/YoloRegion" : numpy.ndarray with shape (1,255,52,52), "detector/yolo-v3/Conv_6/BiasAdd/YoloRegion" : ...
1
vote
1answer
17 views

How to compare a sentence with a paragraph and get its probability in terms of correctness?

This is my first post on stackoverflow network and I am dealing with a machine learning. Lets say I have a paragraph describing a rabbit and tortoise story. The story concludes that tortoise is a ...
0
votes
0answers
12 views

Can I update weights of keras neural net only if validation improves?

I am training a neural network in keras and I reach a classical limit - my training accuracy improves with increasing epochs, but my validation accuracy decreases after 9 epochs (see figure). I ...
1
vote
1answer
57 views

Random accuracy results on validation set (Binary classification)

I am configuring a CNN model for a classification problem of human action in Python using TensorFlow. My data is video frames representing human body joints. Every 3 consecutive columns represent x,y,...
1
vote
1answer
65 views

Training an ensemble of small neural networks efficiently in TensorFlow 2

I have a bunch of small neural networks (say, 5 to 50 feed-forward neural networks with only two hidden layers with 10-100 neurons each), which differ only in the weight initialization. I want to ...
1
vote
0answers
21 views

Use pretrained model and create another sequential model

I have a pre-trained model, as below Code for the above model is as below,which is working as expected and I have saved this model separately in ".h5" keras format ...
0
votes
0answers
6 views

MIssing RELU in leela-zero coding for policy and value heads

For policy and value heads, why two leela-zero coding snippet below gives different number of RELU layers ? There is only 1 RELU layer in python code snippet, while there is none in c++ code snippet. ...
0
votes
0answers
11 views

Multilabel Image classification via multiple binary datasets

I want to make a multilabel image classification model that can detect many different labels. For each label, I can get at least 5000 positive examples and 5000 negative examples. However, my question ...
1
vote
0answers
13 views

Getting errors while trying to install tensorflow on ubuntu

I was following these instructions for installing tensorflow. I tried pip install --upgrade tensorflow but am getting this error: ...
0
votes
0answers
37 views

TensorFlow: What is wrong with my (generalized) dice loss implementation?

I use TensorFlow 1.12 for semantic (image) segmentation based on materials. With a multinomial cross-entropy loss function, this yields okay-ish results, especially considering the sparse amount of ...
6
votes
2answers
40 views

vgg16 needs less epochs than resnet ,why?

Recently i Have been comparing the vgg16 with resnetv1 with 20 layers.I have found out that although each epoch on vgg takes more time to complete,it generally needs less epoch to reach a certain ...
3
votes
0answers
27 views

Softmax activation predictions not summing to 1

I am a beginner with rnns, consider this sample code ...