Questions tagged [tensorflow]

For questions related to Google's open source library for machine learning and machine intelligence.

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

How can I compute the loss of the generator externally before computing the final loss? [migrated]

Let's assume I would like to train a generative network. This network should back-propagate based on two loss functions. The second one (input_XB) is the ...
0
votes
1answer
41 views

Is it worth implementing my own neural network in Python when there are frameworks like TensorFlow? [closed]

Right now, I am implementing my neural network in Python from scratch, building all from the ground up (activations, losses and optimizers). It's all fun and interesting, but when it comes to ...
1
vote
0answers
13 views

Why does the result when restoring a saved DDPG model differ significantly from the result when saving it?

I save the trained model after a certain number of episodes with the special save() function of the DDPG class (the network is saved when the reward reaches zero), but when I restore the model again ...
0
votes
1answer
46 views

How to handle extremely 'long' images?

After transforming timeseries into an image format, I get a width-height ratio of ~135. Typical image CNN applications involve either square or reasonably-rectangular proportions - whereas mine look ...
0
votes
0answers
10 views

What is the batchSize in TensorFlow's model.fit() function? [migrated]

After having defined a model with TensorFlow.js, you can run model.fit() to train it. This function takes a number of parameters, including a configuration object. ...
0
votes
0answers
7 views

tf.data.Dataset: The `batch_size` argument must not be specified for the given input type [migrated]

I'm using Talos and Google colab TPU to run hyperparameter tuning of a Keras model. Note that I'm using Tensorflow 1.15.0 and Keras 2.2.4-tf. ...
0
votes
0answers
11 views

Can I run Tensorflow if my GPU is compatible but my CPU is not? [migrated]

I am considering buying a GPU that is compatible with Tensorflow. However, the CPU in the same machine is not. Can I still run only Tensorflow GPU? Thanks
0
votes
0answers
13 views
2
votes
0answers
13 views

Adding a dense layer after a conv2d layer in a convolutional autoencoder

I am trying to implement a convolutional autoencoder with a dense layer at the bottleneck do to some dimensional reduction. I have seen two approaches for this which arent particularly scalable. The ...
0
votes
0answers
10 views

Verifying if GPU is actually used in Keras/Tensorflow, not just verified as present [migrated]

I've just built a deep learning rig (AMD 12 core threadripper; GeForce RTX 2080 ti; 64Gb RAM). I originally wanted to install CUDnn and CUDA on Ubuntu 19.0, but the installation was too painful and ...
0
votes
0answers
6 views

How to use a cv2 image augmentation function with tensorflow tf.data.Dataset? [migrated]

I am using tf.data.Dataset to create my dataset and training a CNN with keras. I need to apply masks on the images, and the mask depends on the shape of the image, ...
0
votes
0answers
9 views

Should spectral normalization be passed as a kernel_regularizer or kernel_constraint argument in a Dense layer? [migrated]

I do not quite understand the difference between the parameters kernel_regularizer and kernel_constraint of the ...
0
votes
0answers
15 views

How can I implement a simple memory augmented neural network as provided in this PyTorch implementation with Tensorflow 2 and Keras? [migrated]

I found this repo (https://github.com/donggong1/memae-anomaly-detection) with a PyTorch implementation of a simple memory for a neural network. I think that this memory can be really easily ...
1
vote
0answers
17 views

How can I implement a custom loss function that takes into account multiple predictions of the network? [migrated]

I am currently implementing a CNN with a custom error function. The problem I am trying to solve is physics-based, so I can calculate the maximal achievable precision, or to put it another way, I know ...
0
votes
0answers
18 views

Error when checking input: expected dense_203_input to have shape (1202,) but got array with shape (1,) [migrated]

I've made a very simple neural network, which is meant to do reinforcement learning. However, I cannot predict anything as I get an error when trying to predict. Error in question: Error when ...
0
votes
0answers
11 views

what is the meaning of “None” in TensorFlow keras model? [migrated]

I am using TensorFlow with Keras for pattern recognition. My input data is a 32*32 pixel binary image and the output is 4 classes. I created model as follow ...
0
votes
0answers
30 views

Why am I getting “IndexError: list index out of range” when training on the cloud? [migrated]

I resorted to using the cloud training workflow. Given the product I got, I would have expected to drop directly into the code that I have that works with other tflite models, but the cloud produced ...
0
votes
0answers
16 views

TensorFlow to LOW memory usage [migrated]

I'm on an Ubuntu 19.10 machine (with KDE desktop environment) with 8GB of RAM, an i5 8250u and an MX130 gpu (2GB VRAM),running a Jupyter Notebook with tensorflow-gpu I was just training some models to ...
1
vote
0answers
16 views

Pre-trained Models for Topic Modelling Transfer Learning (LDA)

I've been searching online - and so far, I've been unable to find any publicly-accessible pre-trained models that can be used for LDA Topic Modeling - Transfer Learning. Can anyone share any ...
0
votes
0answers
21 views

Which axis of the input of the RNN is used as the “temporal” axis in Keras? [migrated]

When using a SimpleRNN or LSTM for classical sentiment analysis algorithms (applied here to sentences of length <= 250 words/tokens): ...
1
vote
0answers
37 views

Neural Network Results always the same

I have a GRU model which has 12 features as inputs and I'm trying to predict output power. I really do not understand though whether I choose 1 layer or 5 layers 50 neurons or 512 neuron 10 epochs ...
0
votes
0answers
15 views

Trouble with EarlyStopping in tf.keras [migrated]

I am training my first transferred learning model(yay!) and I am having trouble getting the model to stop training when the validation loss hasn't changed by more than 0.1 in more than 3 epochs. ...
2
votes
0answers
27 views

How can I classify logs? [closed]

I wanna build a model to read logs and classify them. How should I start? (preferably TensorFlow solutions). The input is gonna be log files.
0
votes
0answers
18 views

How to run tensorflow inference for multiple models on GPU in parallel? [migrated]

Do you know any elegant way to do inference on 2 python processes with 1 GPU tensorflow? Suppose I have 2 processes, first one is classifying cats/dogs, 2nd one is classifying birds/planes, each ...
1
vote
0answers
35 views

How to deal with features which are here just for training?

I'm new to the Data Science field and last week I started to learn about Neural Networks and Deep Learning. To practice, I decided to do a small project: design a Neural Network to predict the winner ...
1
vote
0answers
16 views

Error: AttributeError: module 'transformers' has no attribute 'TFBertModel' [migrated]

I am applying transfer learning with the python framework (PyTorch). I am getting the below error, when loading a PyTorch pre-trained model in Google Colab. After changing the code 1 to be as code 2, ...
0
votes
1answer
52 views

What are the prerequisites to start using the TensorFlow Probability library? [closed]

I have some familiarity with the regular Tensorflow library and have been able to create a number of working models with it. There are more than enough resources out there to get up and running and ...
2
votes
1answer
22 views

Is it a sign of overfitting when validation_loss dips and then goes up with increasingly bigger swings?

I am experimenting with a ConvNet to categorize images taken with a depth camera. So far I have 4 sets of 15 images each. So 4 labels. The original images are 680x880 16-bit grayscale. They are scaled ...
1
vote
0answers
16 views

can't reproduce model.fit with GradientTape [migrated]

I've been trying to investigate into the reason (e.g. by checking weights, gradients and activations during training) why SGD with a 0.001 learning rate worked in training while Adam fails to do so. (...
0
votes
0answers
12 views

How to store the gradients as array in Python? [migrated]

I want to store the final gradient vector of a model as a bumpy array. Is there an easy and intuitive way to do that using Tensorflow?
1
vote
1answer
56 views

Why is my validation/test accuracy higher than my training accuracy

Is this due to my dropout layers being disabled during evaluation? I'm classifying the CIFAR-10 dataset with a CNN using the Keras library. There are 50000 samples in the training set; I'm using a ...
1
vote
0answers
13 views

AI Logistic center simulation [closed]

First of all, I am pretty new to python and Ai and never realised a project before. I am a PLC-programmer with experience, but never did anything like this: I was thinking about a logistic center ...
0
votes
0answers
11 views

Irregular results while prediction identical object on same image

I used the pre-trained model faster_rcnn_resnet101_coco.config with my own dataset. I have two issues some objects were not detected, while I learned it, with a high number of steps, and test over ...
0
votes
1answer
25 views

Is it possible to use deeplearning with spark (with a distributed databases as HDFS or Cassandra)?

If it is possible, will it be really useful or the model will end up converging very early(with a typical optimum learning rate) ? Any content on this topic will be helpful for me.
0
votes
1answer
67 views

Why is my loss (binary cross entropy) converging on ~0.6? (Task: Natural Language Inference)

I’m trying to debug my neural network (BERT fine-tuning) trained for natural language inference with binary classification of either entailment or contradiction. I've trained it for 80 epochs and its ...
0
votes
0answers
28 views

Training an unsupervised convolutional neural network to learn a general representation of a Lua module

I am trying to train a CNN in keras to learn a general representation of a Lua module, e.g. requires at the beginning, local variables, local functions, interface (returns) and in between some ...
2
votes
2answers
64 views

How can I perform lossless compression of images so that they can be stored to train a CNN?

I have a set of images, which are quite large in size (1000x1000), and as such do not easily fit into memory. I'd like to compress these images, such that little information is missing. I am looking ...
1
vote
1answer
38 views

Is there a car detection software written in Tensorflow or Keras with Python?

For a current project demo, I'm searching for a car detection neural network in Python written in TF/Keras (or any other type, as long as it has no C++ dependencies). Later on, I gonna write my own, ...
1
vote
0answers
17 views

Can tensorflow debugger debug a trained keras model during prediction?

I have a trained LSTM model created with keras. Is it possible to use tensorboard debugger or tensorflow debugger to debug the model during prediction runtime? Meaning that it steps through the model ...
1
vote
1answer
65 views

Why isn't my implementation of DQN using TensorFlow on the FrozenWorld environment working?

I am trying to test DQN on FrozenWorld environment in gym using TensorFlow 2.x. The update rule is (off policy) $$Q(s,a) \leftarrow Q(s,a)+\alpha (r+\gamma~ max_{a'}Q(s',a')-Q(s,a))$$ I am using an ...
1
vote
0answers
8 views

Standardize images using ImageDataGenerator in keras

I was trying to normalize my input data images for feeding to my convolutional neural network and wanted to use standardize my input data. I referred to this article: https://stackoverflow.com/...
2
votes
0answers
26 views

Can we use a neural network that is trained using Reinforcement Learning for dynamic game level difficulty designing in realtime?

I am a newbie to Machine Learning and AI. As per my understanding, with the use of reinforcement learning (reward/punishment environment), we can train a neural network to play a game. I would like ...
2
votes
1answer
55 views

How to detect vanishing gradients?

Edit: I've reworked my question to generalize better and be more on-topic, and be mostly software implementation agnostic. Can vanishing gradients be detected by the change in distribution (or lack ...
1
vote
0answers
13 views

Simple sequential model with LSTM which doesn't converge

I'm actually trying to create a sequential neural network in order to translate a "human" sentence in a "machine" sentence understandable by an algorithm. Like It didn't work, I've try to create a NN ...
1
vote
0answers
29 views

Are there any tools I can use to debug a Keras LSTM model during prediction?

I want to be able to debug my Keras LSTM model. For example, I want to be able to check the values of the input/output gates, cell states and hidden states at every time-step during prediction. Are ...
0
votes
1answer
25 views

What is the difference between TensorFlow's callbacks and early stopping?

What is the difference between TensorFlow's callbacks and early stopping?
0
votes
1answer
37 views

Is this neural network architecture appropriate for CIFAR-10?

I have a CNN architecture for CIFAR-10 dataset which is as follows: Convolutions: 64, 64, pool Fully Connected Layers: 256, 256, 10 Batch size: 60 Optimizer: ...
0
votes
1answer
55 views

Indexing tensors in custom loss function with Keras

I'm using a custom loss function in Keras. This is the function: ...
0
votes
0answers
14 views

Tensorflow neural network - inherent overfitting in certain X and Y distributions?

Really open ended question here... I'm working on a classifier model that is used to predict whether some amount is > x, ...
1
vote
1answer
26 views

I need to select the image from a predefined dataset that are the closest to the input, is this possible or do I even need to use ML/AI?

So as the title states, I have a set of images and I want to process input images and need to select the image that "looks" the most like the input image. I know I've seen something similar where the ...

1
2 3 4 5 6