Questions tagged [tensorflow]

TensorFlow is an open source library for machine learning and machine intelligence. It is developed by Google and became open source in November 2015.

Filter by
Sorted by
Tagged with
10
votes
2answers
246 views

Convert an English sentence to German using Bahdanau Attention

Context I am following this tutorial . My mission is to convert an English sentence to a German sentence using Bahdanau Attention. Summary of the Code I first took the whole English and German ...
4
votes
0answers
41 views

Constraining monotonicity in the loss function during training

I have a neural network that I am training on a loss function composed of two terms (i.e. loss = loss1 + loss2). Ideally, I would like for both ...
2
votes
0answers
38 views

Cosine Similarity Matrix Loss Function

I am currently implementing this paper on generalised end to end loss: https://arxiv.org/pdf/1710.10467.pdf A batch of N speakers and M utterances are fed to the model which outputs an embedding ...
2
votes
0answers
28 views

Converting tensorflow v1 to v2 without compatability.v1

I am in the process of converting this code predictor.py located here to tensorflow v2 with Python 3.7. I want to do this conversion part by part. So from the ...
3
votes
0answers
41 views

Doing image compression with Neural Network AutoEncoders

I wanted to create an image compressor using Machine Learning and started work on an "AutoEncoder". This is a type of Neural Network which takes in the image and creates a compressed vector form. It ...
1
vote
1answer
34 views

Tensorflow Python ML to Detect Emotion [closed]

I've created an application to predict emotions. But I think the application is being over fitted. And I cannot figure out how to solve the overfitting. I'm using a small data set of 107 images spread ...
2
votes
0answers
48 views

ML text generating code with Python and Tensorflow

I wanted a simple code review for improvement to increase the efficiency of my text generating model. This model is taken from the official TensorFlow site but is being trained on different datasets. ...
3
votes
1answer
29 views

Creating generator object with image augmentation to train Convolutional Neural Networks with Keras

I am currently self-studying on Python generator object and use it to generate training data and do augmentation on-the-fly, then feed it into Convolutional Neural Networks. Could anyone please help ...
3
votes
0answers
115 views

PPE object detection with tensorflow and opencv with rtsp streams

I am working on an object detection API implemented in Tensorflow 1.14 and OpenCV 4.1, where my task is to recognize personal protection equipment (PPE) worn by workers at various construction site ...
2
votes
1answer
616 views

Keras stacked LSTM model for multiclass classification

I am working on a multiple classification problem and after dabbling with multiple neural network architectures, I settled for a stacked LSTM structure as it yields the best accuracy for my use-case. ...
4
votes
0answers
63 views

Evaluating a previously calculated gradient function

I am trying to perform optimization using a surrogate model instead of the real function and for that, I need the gradient of my LSTM model with respect to the input. In this case, I have 3 features ...
5
votes
0answers
56 views

Tensorflow loop to analyze gradients derived from MRI and PET images

The code shown below takes the partial derivative of each pixel of the output fused image of a neural network with respect to input image of the neural network using tensorflow's ...
4
votes
1answer
94 views

U-Net: A TensorFlow model

What I want to know I am writing a ML model called U-Net with Python (and TensorFlow). My question is not about the machine learning or Tensorflow, I want to know the best structure of the code. I ...
3
votes
0answers
42 views

TensorFlow regressor to predict probability of winning, given a current score

This is a TensorFlow regressor that tells me that if you get x score, you will have x% to win a game in x game(game is not important). Doing this as a project to learn tensorflow. ...
2
votes
0answers
759 views

Simple Self-Organizing Map (SOM) in Tensorflow

I've implemented a self-organising map in Tensorflow's low-level API. After testing with sklearn's Iris data, the results seem correct. I did implement the algorithm also using NumPy before converting ...
3
votes
0answers
688 views

A simple toy ResNet model and its implementation

I want to understand how resnet works also called us residual networks and I understand it better when I code one myself. I tried to find a simple implementation of resnet in the web but most I found ...
1
vote
0answers
310 views

Tensorflow model for predicting dice game decisions

For my first ML project I have modeled a dice game called Ten Thousand, or Farkle, depending on who you ask, as a vastly over-engineered solution to a computer player. You can find the complete game, ...
2
votes
0answers
456 views

Principal Component Analysis in Tensorflow

To learn the low-level API of Tensorflow I am trying to implement some traditional machine learning algorithms. The following Python script implements Principal Component Analysis using gradient ...
3
votes
1answer
334 views

BipedalWalker-v2 one-step actor-critic agent trains slow

I'm trying to solve the OpenAI BipedalWalker-v2 by using a one-step actor-critic agent. I'm implementing the solution using python and tensorflow. My question is whether the code is slow because of ...
1
vote
0answers
106 views

Augmented training batch generation using `tensorflow.data`

This is my code for generating augmented training batches in Tensorflow ...
4
votes
0answers
192 views

Distributed TensorFlow | VGG 16

I am trying to develop a VGG 16 model distributed over a single server. I have one available GPU server with 1 CPU and two GPU cards. I have the code to treat them as different servers and implement ...
4
votes
0answers
271 views

Linear Regression in Tensorflow

I am a machine learning newbie and recently I implemented (or at least tried to implement) a linear regression model in tensorflow. I would love to know how I can improve my code: ...
5
votes
0answers
141 views

Deep learning CNN for image recognition using tensor flow

This algorithm is a convolutional deep neural network used for image recognition. I used the MNIST data set, which is a bunch of images from 0 to 9. As of right now, I have trained this image with ...
3
votes
0answers
4k views

Code for Training a Handwriting Recognition Model

I just made my machine learning code work a few days ago and I would like to know if there's a way to improve my code. Before I get to the implementation of the tasks at hand, I would like to ...
2
votes
0answers
767 views

Optimize GPU usage for real-time object detection from camera with TensorFlow GPU and OpenCV

Trying to recognize objects real time using TensorFlow Object Detection API OpenCV using ssd_mobilenet_v1_coco_11_06_2017 model in GPU. ...
1
vote
0answers
336 views

Training MLP classifier with TensorFlow on notMNIST dataset

I am new to TensorFlow and I would really appreciate if someone could look at my code to see whether things are done efficiently and suggest improvements. This code works okay and achieves around 91....
5
votes
0answers
700 views

Low accuracy of LSTM model tensorflow [closed]

I am trying to learn LSTM model for sentiment analysis using Tensorflow, I have gone through the LSTM model. Following code (create_sentiment_featuresets.py) generates the lexicon from 5000 positive ...
4
votes
2answers
716 views

Python Script: Converts .tsv to TFRecord

The python code below converts a tab spaced values file (.tsv) into a TFRecord in hopes that this approach expedites future time spent loading the data. Is the performance of this task correct and ...
2
votes
0answers
732 views

Implementing Adagrad in Python

I'm trying to implement Adagrad in Python. For learning purposes, I am using matrix factorisation as an example. I'd be using Autograd for computing the gradients. My main question is if the ...
8
votes
1answer
2k views

Speech Recognition Part 3: Training the Neural Network

The last part of my speech recognition series: finally training my network. Here's the dataset I did it with (self-generated, small I know), and the code I used. After running this code (takes ...
3
votes
0answers
71 views

Tensorflow implementation of the Thomson model

I've implemented the Thomson model in Tensorflow and it seems to work very well. I'm repeating some computation by computing the other half of the symmetric distance matrix. I think, for a GPU based ...
16
votes
2answers
401 views

MNIST Deep Neural Network in TensorFlow

I have been working on this code for a while and it gave me a lot of headaches before I got it to work. It basically tries to use the MNIST dataset to classify handwritten digits. I am not using the ...