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
-1 votes
0 answers
11 views

How to implement the RL solution as given below in tensorflow?

Input: Inputs given to model of some shape Output: Output from model of some shape reward=reward_function() memory=Sequential_Memory() NN= Sequential_Tensorflow_model() DQN = DQN model from keras-rl, ...
0 votes
0 answers
9 views

Best methods to square rectangular images for OR

I've read previous posts that assert using one of these solutions: crop and or resize nn input size independent In my case, I am using some tensorflow models and afaik they report a fixed size like ...
1 vote
1 answer
27 views

How does the memory augmented neural network work, and how to make a simple implementation?

How does the memory augmented neural network (MANN) work? How can I make a simple MANN with a vanilla neural network especially without a recurrent network?
  • 996
0 votes
2 answers
102 views

Please help me understand the role of loss function in neural networks

I've been studying NNs with tensorflow and decided to code a simple NN from scratch to get a better idea on hwo they work. It my understanding that the cost is used in backpropagation, so basically ...
-1 votes
0 answers
24 views

Few Shots Learning using Keras Tensorflow [closed]

How to implement few shots learning using Tensorflow for image classification?Can anyone help me with any sample code?
0 votes
0 answers
27 views

what is tfrs.metrics.FactorizedTopK in tensorflow recommenders

from the official documentation link In our training data we have positive (user, movie) pairs. To figure out how good our model is, we need to compare the affinity score that the model calculates ...
0 votes
0 answers
31 views

Seq2seq with attention model only predicts index 0 in a text generation task

I am trying to build a model which summarizes some brief input text (X) and generates a headline (Y). The problem is that the model always outputs 0 as the vocabulary index, which I think that might ...
3 votes
0 answers
40 views

Why does a neural network struggle to solve this simple problem?

Consider the following problem: Given a vector x of size dim with values between 0 and 1 (exclusive), determine if ...
  • 191
0 votes
0 answers
37 views

How "exactly" are AI-accelerator chip ASICs built differently than GPUs as GPU seem to lead for many AI workloads on performance

There is a lot of discussion on google search about AI-custom-accelerators (like Intel's Gaudi) and GPUs. Almost all of them say generic things like, a) AI Accelerator chip is for specialized AI ...
  • 171
2 votes
2 answers
106 views

Why is a simple regression problem so hard for an MLP to learn?

Consider a very simple problem, which is to find the maximum value out of a list of 5 numbers between 0 and 1. This is obviously trivial, but serves as a good example for a real-world problem I'm ...
  • 191
0 votes
0 answers
21 views

How to organize data for training a neural network to raytrace images

I am trying to train a neural network to go from a series of numbers(data about a 3D scene, such as camera position, sphere position, radius, and color, etc) to a raytraced image. I can generate as ...
  • 1
0 votes
0 answers
21 views

How do transformers handle multidimensional input?

Transformers work with lists of vectors, i.e. sentence of length SEQ_LEN, with each word having size EMBEDDING_DIM. Now, since the model still makes use of Dense layers internally, i.e. as in https://...
0 votes
0 answers
6 views

How does the 'moment's matching trick' in GAN training improve the diversity of the generated samples?

I was investigating the TimeGAN code, when i stumbled across the 'moments loss' component. In one of the issues, the author states that this is a 'moment's matching trick' used 'to improve the ...
0 votes
1 answer
53 views

How do I use ResNet for text processing?

I need to implement a deep neural network [residual neural network (ResNet)] that takes some text as an input [length M x N] and then processes it. Now as far as my understanding goes, ResNet is used ...
  • 1
0 votes
0 answers
12 views

Are there techniques (pygad - tpot-optuna)for best Genatic algorithm optimize hyper prameter cnn 1D

Iam new in mashin learning and i try to optimize tenser flow with keras conv1d model to improve classification by improve hyper kernal and filter For training dataset csv =(1325,33,1) with outputs ...
  • 1
0 votes
0 answers
9 views

Referencing features by name instead of index when feeding inputs

Traditionally the inputs of a model is a matrix of N dimensions. This works well with inputs that are position-sensitive (For example in CV the placement of the pixels relative to each other can be ...
1 vote
0 answers
9 views

Replay Buffer taking long time to construct (Reinforcement Learning DQN with tf-agetns)

I'm new to Reinforcement Learning and I have some question. I am actually training some DQN using the tf-agents from tensorflow. And I recently learned that it's not possible to train a DQN using ...
  • 11
1 vote
1 answer
46 views

Multiplying tensors element-wise along one dimension

I'm new to TensorFlow and I want to perform the following operation on two tensors. Let $A_{\mu_1,\dots,\mu_M}$ be a tensor of rank $M$ and let $B_{\nu_1,\dots,\nu_N}$ be a tensor of rank $N$. The ...
  • 121
0 votes
1 answer
25 views

What camera resolution is good for Resnet101 SSD FPN 1024x1024

I am going to use this model for my school project. Just wondering if I bought a 1920x1080 camera, will resizing it to 1024x1024 will cause the drop of image quality(make model harder to detect object ...
  • 107
0 votes
1 answer
41 views

Why model in tensor flow model zoo have low mAP?

I read in paper and article SSD model achieved above 70% mAP but when i browse through tensor flow model zoo, the mAP of SSD is around 30-40% in this link https://github.com/tensorflow/models/blob/...
  • 107
0 votes
0 answers
23 views

How to add a SimpleRNN layer within Convolutional layers in tensorflow without changing ndim?

I'm trying to add a RNN layer within a Convolutional layer. Unfortunately due to difference of ndim it's failing to create a model. Model: ...
0 votes
0 answers
18 views

cannot get the results for each individual execution in hyperband tuner

I am trying to use keras tuner hyperband to select hyperparameters for my autoencoder model. Here's some pseudo code: ...
0 votes
0 answers
23 views

How does a multilayered RNN look, when unrolled through time?

I'm a beginner please help. Please provide pictures/explanation of how are the following examples connected when unrolled through time, as shown in this image below, from this paper: "Sentiment ...
  • 13
-1 votes
1 answer
73 views

Why do we need Tensorflow, Keras and other ML/AI modules?

This question might seem stupid at first glance, and it might be - that is because I am very new here and I've tried to think about an answer of my own, and search this question but to find no answer.....
  • 101
0 votes
0 answers
35 views

Graph convolution for multiple disconnected graphs

I have found many examples of graph convolution on TF and StellarGraph that work with a single large graph (like the Cora graph), but I have not found any resources on cases where you have multiple ...
0 votes
1 answer
54 views

What data can I obtain from CNN model (H5 file)? [closed]

I created a CNN model and it is saved in h5 format. I used the Netron app, where I obtained the model architecture, however ...
0 votes
1 answer
74 views

Help on Deep Sarsa algorithm that work with pytorch (Adam optimiser) but not with keras/Tensorflow (Adam optimiser)

I have a deep sarsa algorithm wich work great on Pytorch on lunar-lander-v2 and I would use with Keras/Tensorflow. It use mini-batch of size 64 wich are used 128 time to train at each episode. There ...
  • 1
1 vote
1 answer
64 views

How do you display a neural network

I'm new to tensorflow and ML but am progressing slowly. I know how to look at the weights and biases but am still trying to figure out if there is an easy way to display a neural network in the ...
  • 151
0 votes
0 answers
39 views

Autoencoder make spectrogram important parts more pronounced with a "log loss"

Hi I want to create a neural network that essentially picks out the most pronounced parts of a spectrogram. Assume this is the True spectrogram: ...
  • 101
0 votes
0 answers
186 views

how to appy action mask

I'm trying to figure out how action masking works and the closest workaround i get is following the hanabi environment example and then write my own custom version ...
0 votes
1 answer
41 views

Taxonomy of terms in DL [closed]

I am trying to teach myself DL and among other difficulties I found it quite challenging to structurize a very basic terminology vocabulary especially when it includes not only theoretical stuff but ...
  • 159
0 votes
1 answer
43 views

Does sequence matter in LSTM?

In general, as long as the items are in order as per time sequence, does it matter if it's in ascending time sequence or descending time sequence for LSTM within the input vector? eg: ABCDEF -> G ...
1 vote
1 answer
65 views

Why does my neural network perform different on the same images during training and testing?

I use tensorflow keras to build a neural network that classifies images of covid-19 rapid tests into three classes (Negative, Positive, Empty). During training the ...
0 votes
1 answer
180 views

How exactly does Keras calculate the validation accuracy?

After each epoch, Keras provides the following evaluations (depending on how the model is compiled): train_accuracy train_loss validation_loss validation_accuracy Keras evaluates the performance of ...
  • 101
0 votes
1 answer
159 views

Retraining ResNet-50 for iris flower classification

I am trying to retrain ResNet-50 for iris flower classification in tensorflow (TensorFlow version: 2.3.0) using the following code ...
  • 11
0 votes
0 answers
19 views

How to Decide on the Structure of a Neural Network for Time Series Forecasting?

Apologies for the noob question. I am attempting time series forecasting (with a combination of lag and categorical features) using tensorflow and struggling to find an optimal combination of RNN/LSTM ...
  • 111
0 votes
1 answer
36 views

Shuffling vs Non-shuffling train/test set yields drastically different results

I am currently working with a very deep NN (200mio. to 350mio. params). My data set is roughly of shape (2mio, 350), i.e. 2mio samples and 350 features. In fact, the features are time series. As input ...
0 votes
1 answer
59 views

Darknet as a part of Yolo v3

I am pretty new to ML and my question may look strange. Especially the last part of it. 1)As far as I understand Darknet53 is an integral part of Yolo just as Resnet50 is a part of R-CNN Am I right? 2)...
  • 159
1 vote
0 answers
18 views

Bayesian optimization with confidence bound not working

I have a simple MLP for which I want to optimize some hyperparameters. I have fixed the number of hidden layers (for unrelated reasons) to be 3. So the hyperparameters being optimized through Bayesian ...
  • 121
1 vote
1 answer
74 views

Datasets input at model.fit produce unexpected results of training loss vs validation loss

Im trying to train a neural network (VAE) using tensorflow and Im getting different results based on the type of input in the model.fit. When I input arrays I get normal difference between the ...
user avatar
0 votes
1 answer
171 views

How to build the actor policy of Soft-Actor-Critic after sampling from a Multivariate normal distribution?

I'm trying to solve LunarLanderContinuous-v2 (https://www.gymlibrary.ml/environments/box2d/lunar_lander/) using Soft Actor-Critic algorithm (following the pseudocode above) To update the actor policy ...
0 votes
0 answers
46 views

Why Is There The Term 1/m In Backpropagation

In backpropagation the gradients are used to update the weights using the formula $$w = w - \alpha \frac{dL}{dw}$$ and the loss gradient w.r.t. weights is $$\frac{dL}{dw} = \frac{dL}{dz} \frac{dz}{dw} ...
0 votes
0 answers
36 views

How to generate multiple captions from an image captioning model in Keras/Tensorflow

I am practicing one of the popular image captioning keras model (LINK IS HERE). Basically this model takes Flickr8k dataset where each image has 5 captions. ...
  • 3
1 vote
1 answer
155 views

Time taken to solve cartpole environment using DQN

I am trying to solve the cartpole environment (GitHub) using DQN agent. I have been building my own DQN agent by following a tutorial by Jon Krohn. I am able to solve the environment with a maximum ...
0 votes
1 answer
77 views

Metrics using batches v/s metrics using full dataset

I am using training an image classification model using the pre-trained mobile network. During training, I am seeing very high values (more than 70%) for Accuracy, Precision, Recall, and F1-score on ...
  • 151
0 votes
0 answers
16 views

How to penalize the dependence to inputs in Tensorflow + Keras?

I have a sample of triplets $(x,y,z)$ with $z = f(x,y) + \epsilon$ where $\epsilon$ is a centered noise. I want to learn $f$ through a neural network in tf.keras. What I know about $f$ is that $f(x,y)$...
  • 111
0 votes
0 answers
422 views

Tensorflow-gpu and multiprocessing

I have finished implementing an Asynchronous Advantage Actor-Critic (A3C) agent for TensorFlow (gpu). By using a single RMSprop optimizer with shared statistics. To do so, a central controller holds ...
0 votes
0 answers
25 views

Learned kernels in CNN seem just random patterns

I am training a classification neural network using Tensorflow2 (specifications below). The training goes well (good accuracy and no overfitting, apparently). During the training I monitor the learned ...
  • 269
0 votes
0 answers
23 views

Can I create and train a feedforward layer with only K active connections?

I had an idea for a layer, but I'm not sure if it exists already and/or if it's implementable in tensorflow. I would like to have a layer that is similar to a Dense layer, in the way that it's ...
1 vote
0 answers
243 views

Why can't I reproduce my results in keras using random seed? [closed]

I was doing a task using RNN to predict a time series movement. I want to make my results reproducible. So I strictly followed this post: https://stackoverflow.com/questions/32419510/how-to-get-...

1
2 3 4 5
7