Questions tagged [tensorflow]

For questions related to Google's open-source library for machine learning and machine intelligence. However, note that programming questions are off-topic here.

Filter by
Sorted by
Tagged with
2
votes
0answers
18 views

If I want to predict two unrelated values given the same sequence of data points, should I have a model with two outputs or two models?

I want to predict two separate y-values (not really logically connected) based on an input sequence of data (values x). Using LSTM cells. Should I train two models separately or should I just increase ...
0
votes
1answer
21 views

setting up last layer in tensoflow for class type of label [closed]

I am creating a NN in tensorflow keras. the inputs are all float and the output is a class. The output currently encoded as a float, but only has 4 values (0,1,2,3). My model is similar to this: ...
5
votes
2answers
52 views

Why is tf.abs non-differentiable in Tensorflow?

I understand why tf.abs is non-differentiable in principle (discontinuity at 0) but the same applies to tf.nn.relu yet, in case of this function gradient is simply set to 0 at 0. Why the same logic is ...
0
votes
0answers
45 views

Is it possible to transform audio with neural networks to make it sound like 3d sound

so the idea is to feed neural network data like input: mono audio(extracted from existing 3d audio) output: 3d audio after training it should convert mono audio to 3d sound do you think it is possible?...
4
votes
1answer
1k views

Is there a machine learning model that can be trained with labels that only say how “right” or “wrong” it was?

I'm trying to find the name for a model that is used to output a decision (maybe something like right, left, or ...
2
votes
0answers
33 views

CNN leaf segmentation throught classification of edges how to improve

I am trying to design a CNN that can do pixel wise segmentation of edges leaves in dense foliage agriculture images. Such as these: On the basis of this article https://arxiv.org/pdf/1904.03124.pdf, ...
0
votes
1answer
53 views

Extracting information from RNA sequence

I am relatively new to machine learning, and I am trying to use a deep neural network to extract some information from sequences of RNA. A quick overview of RNA: there is both sequence and structure. ...
0
votes
0answers
22 views

How to change the number of input neurons in embedding layer?

I was building a recommender system using Tensorflow recommenders (TFRS) library . I was following the official tutorial for ranking model , where they have used two-tower model. The part where I have ...
2
votes
0answers
30 views

NN to find arbitrary transformation

Problem description I'm creating a clock with 4 seven-segment LED displays. In an effort to get more familiar with tensorflow, I figured I should try to drive this clock with use of a Neural Network. ...
2
votes
0answers
28 views

Single-value loss/training in a CNN with a tensor output

I am playing around with an idea of using using Q-learning with a DQN (Deep Q-Network), to determine the optimal position of a number of 'units' on a grid of allowed locations, according to some ...
0
votes
0answers
14 views

How to deal with dynamically changing input tensor in neural networks without padding?

I have a dataset about the monitored health/growth of a community of people. The dataset has tensor shaped (batch_size, features, person, window), where: person==...
1
vote
2answers
77 views

How to recognize sequence of digits in an image

I am learning to program neural networks and others, and I would like to know how I can get the numbers that are in an image, for example if I pass an image that has 123 written, get with my model ...
0
votes
0answers
23 views

Is the dimensionality of the query and key tensors in this implementation of the transformer's self-attention correct?

Looking at this tutorial matmul_qk = tf.matmul(q, k, transpose_b=True) # (..., seq_len_q, seq_len_k) is the output of two tensors multiplied of shape: ...
1
vote
1answer
31 views

Bounding Box Regression - An Adventure in Failure

I've solved many problems with neural networks, but rarely work with images. I have about 18 hours into creating a bounding box regression network and it continues to utterly fail. With some loss ...
0
votes
0answers
18 views

Conversion of convolution filter weights between NCHW and NHWC formats

Popular deep learning frameworks have different default data formats (PyTorch with NCHW, TensorFlow with NHWC), which lead to published pretrained models with weights that may have an incompatible ...
0
votes
1answer
29 views

Why won't my model train with CTC loss?

I am trying to train an LSTM using CTC loss, but the loss does not decrease when I train it. I have created a minimal example of my issue by creating training data where the network simply has to copy ...
1
vote
3answers
99 views

How to embed/deploy an arbitrary machine learning model on microcontrollers?

Say I have a machine learning model trained on a laptop and I then want to embed/deploy the model on a microcontroller. How can I do this? I know that TensorflowLite Micro generates a C header to be ...
0
votes
1answer
23 views

Is it possible to modify or replace the basic network of YOLO?

I have an idea to adapt YOLO algorithm to my application, the original YOLO algorithm is for image classifications, which have 24 convolutional layers with output class of 1000, is it possible to ...
0
votes
0answers
29 views

Multivariate time-series classification with many variables

I am attempting to use time-series classification algorithms for fraud detection applications. I have came across several works in the literature that propose novel techniques for multivariate time-...
2
votes
1answer
60 views

Can TensorFlow, PyTorch, and other mainstream ML frameworks be used for research-grade work in AI?

Many authors of research papers in AI (e.g. arXiv) write their neural networks from the ground-up, using low-level languages like C++ to implement their theories. Can existing open source frameworks ...
0
votes
2answers
55 views

Simple DQN too slow to train [closed]

I have been trying to solve the OpenAI lunar lander game with a DQN taken from this paper https://arxiv.org/pdf/2006.04938v2.pdf The issue is that it takes 12 hours to train 50 episodes so something ...
0
votes
0answers
99 views

How the parameters of decay_rate & decay_steps are taken into consideration while computing InverseTimeDecay()

During the last couple of days, I am experimenting with the different schedulers of learning rate decay offered by Keras (link here). Specifically, I have been using InverseTimeDecay: A ...
3
votes
0answers
29 views

Validation accuracy higher than training accurarcy

I implemented the unet in tensorflow for the segmentation of MRI images of the thigh. I noticed I always get a higher validation accuracy by a small gap, independently of the initial split. One ...
2
votes
0answers
56 views

Why do I get higher average dice accuracy for less data

I am working on image segmentation of MRI thigh images with deep learning (Unet). I noticed that I get a higher average dice accuracy over my predicted masks if I have less samples in the test data ...
3
votes
0answers
31 views

Why shouldn't batch normalisation layers be learnable during fine-tuning?

I have been reading this TensorFlow tutorial on transfer learning, where they unfroze the whole model and then they say: When you unfreeze a model that contains ...
0
votes
0answers
14 views

Are there any good self annotating methods in machine learning

Currently I want to train a deep learning model on finger detection (drawing bounding boxes around fingers), so I haven't found an annotated dataset, so I decided to make it myself. but the number of ...
2
votes
0answers
21 views

Why does the loss stops reducing after a point in this Transformer Model?

Context I was making a Transformer Model to convert English Sentences to German Sentences. But the loss stops reducing after some time. Code ...
2
votes
1answer
51 views

What's the purpose of layers without biases?

I noticed that the TensorFlow library includes a use_bias parameter for the Dense layer, which is set to ...
3
votes
0answers
37 views

DQN Agent with a 2D matrix as input in Keras

I have a Reinforcement Learning environment where the state is a 2D matrix with 0s and 1s (only one column with the value of 1 in each row). Example: ...
0
votes
0answers
24 views

Implementing Multiclass Dice Loss Function

I am doing multi class segmentation using UNet. My input to the model is HxWxC and my output is, ...
1
vote
1answer
66 views

Advantage Actor Critic model implementation with Tensorflowjs

I am trying to implement an Actor Critic method that controls an RC car. For this I have implemented a simulated environment and actor critic tensorflowjs models. My intention is to train a model to ...
2
votes
1answer
187 views

The truth value of an array with more than one element is ambiguous - Loading a model saved in h5 format keras 2.2.4 [closed]

I'm having a problem when loading a model in keras: model = load_model('model.h5', custom_objects={'mean_iou': metrics.mean_iou}) As an error I get: ...
1
vote
1answer
45 views

Autoencoder: predictions missing for nodes in the bottleneck layer

I'm using tf.Keras to build a deep-fully connected autoencoder. My input dataset is a dataframe with shape (19947,), and the purpose of the autoencoder is to predict normalized gene expression values. ...
2
votes
0answers
124 views

How should I build this DQN agent?

I have a set of users that can be one of 3 types. They will randomly request a service from the UAV which is a drone used as a Base Station. The UAV (the agent) is tasked with allocating subchannels (...
0
votes
0answers
32 views

Why does the validation loss not go down when training my TensorFlow implementation of AlexNet?

I am trying to implement AlexNet in Tensorflow. Matlab has a built-in AlexNet implementation that I use with the cats and dogs dataset (mledu-datasets/cats_and_dogs_filtered.zip). In Matlab, ...
2
votes
0answers
26 views

Loss function decays linearly in segmentation MRI fascia

I am working on a segmentation of MRI images of the thigh. I am trying to segment the fascia, there is a slight imbalance between the background and the mask. I have about 1400 images from 30 patients ...
2
votes
1answer
89 views

Keras DQN Model with Multiple Inputs and Multiple Outputs [closed]

I am trying to create a DQN agent where I have 2 inputs: the agent's position and a matrix of 0s and 1s. The output is composed of the agent's new chosen position, a matrix of 0s and 1s (different ...
0
votes
0answers
14 views

Python Create Keras Neural Network with Bag Of Words Model for News Classification

I want to train a classification neural network then predict some inputs. It's classic classification example as you know. I'm implementing this with python. I searched a lot about it and I always ...
1
vote
0answers
53 views

How to design my Neural Network for Game AI

For my school project, I have to develop an agent to play my game. The base I have is a 'GameManager' which call 2 AIs, each taking a random move to do. To make my AI perform, I decided to make a ...
0
votes
0answers
40 views

Distinguishing between handwritten compound fraction and subtraction

I am working in a project named "Handwritten Math Evaluation". So what basically happens in this is that there are 11 classes of (0 - 9) and (+, -) each containing 50 clean handwritten ...
0
votes
0answers
33 views

How to use Deep Q-Network with two-dimensional input? Hands-on Machine Learning 2

I'm studying with the book Hands-on Machine Learning with Scikit-Learn, Keras and TensorFlow, and I'm trying to implement the Deep Q-Network example that can be found on Github but that the input ...
1
vote
0answers
19 views

Why do we add additional axis in CNN autoencoder while denoising?

I am currently learning about autoencoders and I follow https://www.tensorflow.org/tutorials/generative/autoencoder When denoising images, authors of tutorial add an additional axis to the data and I ...
2
votes
2answers
233 views

How to tell a neural network that: “your i-th input is special”

Assume that I have a fully connected network that takes in a vector containing 1025 elements. First 1024 elements are related to ...
2
votes
1answer
42 views

Evaluate model multiple times in loss function? Is this reinforcement learning?

I am interested in models that exhibit behavior. My goal is a model that survives indefinitely on a two dimensional resource landscape. One dimension represents the location (0 to 1) and the second ...
0
votes
0answers
30 views

How to make a CNN/RNN on a non-binary dataset?

I am using TensorFlow + Keras to make a CNN/RNN. I'm quite new to AI, I've only made a few relatively basic networks for image regression/classification. The end goal of my project is to determine the ...
0
votes
0answers
40 views

Variance of the Gaussian policy is not decreasing while training the agent using Soft Actor-Critic method

I've written my own version of SAC(v2) for a problem with continuous action space. While training, the losses for the value network and both q functions steadily decrease down to 0.02-0.03. The loss ...
0
votes
1answer
27 views

Image Classification for watermarks with poor results

Just starting learning things about tensorflow and NN. As an exercise I decided to create a dataset of images, watermarked and not, in order to binary classify these. First of all, the dataset ( you ...
1
vote
1answer
28 views

Should I prefer cropped images or realistic images for object detection?

I am new to the field of AI but due to the high level of abstraction that comes with services such as Google VisionAI I got motivated to write an application that detects symbols in photos based on ...
1
vote
0answers
44 views

How to design an observation(state) space for a simple `Rock-Paper-Scissor` game?

For weeks I've been working with this toy game of Rock-Paper-Scissor. I want to use a PPO agent learn to beat a computer ...
0
votes
0answers
20 views

How to enforce non-negative outputs in a feed-forward neural network in tensorflow after appropriate scaling?

I am using tf.keras for a regression problem. I am building a simple feed-forward neural network with one hidden layer and tanh activation. (I started with the neural network toolbox as a part of ...

1
2 3 4 5
7