How to initialize random values from a normal distribution in TF learn

This recipe helps you initialize random values from a normal distribution in TF learn

Recipe Objective

This recipe explains how to initialize random values from a normal distribution in TFLayer.

Build a Multi Touch Attribution Model in Python with Source Code

Normal Distribution

Its syntax is: tflearn.initializations.normal (shape=None, mean=0.0, stddev=0.02, dtype=tf.float32, seed=None)
where its arguments are shape which is a shape to initialize a Tensor, mean which is the mean of the truncated normal distribution, stddev which is the standard deviation of the truncated normal distribution, dtype which is the tensor data type and seed which is used to create a random seed for the distribution.

def Normal(s=None, m=0.0, std=0.04, d=tf.float32, seed=None):

if shape:
    return tf.random_normal(s, mean=m, stddev=std, seed=seed, dtype=d)
else:
    return tf.random_normal_initializer(mean=m, stddev=std, seed=seed, dtype=d)

What Users are saying..

profile image

Savvy Sahai

Data Science Intern, Capgemini
linkedin profile url

As a student looking to break into the field of data engineering and data science, one can get really confused as to which path to take. Very few ways to do it are Google, YouTube, etc. I was one of... Read More

Relevant Projects

Learn How to Build a Logistic Regression Model in PyTorch
In this Machine Learning Project, you will learn how to build a simple logistic regression model in PyTorch for customer churn prediction.

Build Deep Autoencoders Model for Anomaly Detection in Python
In this deep learning project , you will build and deploy a deep autoencoders model using Flask.

Detectron2 Object Detection and Segmentation Example Python
Object Detection using Detectron2 - Build a Dectectron2 model to detect the zones and inhibitions in antibiogram images.

Build ARCH and GARCH Models in Time Series using Python
In this Project we will build an ARCH and a GARCH model using Python

Linear Regression Model Project in Python for Beginners Part 2
Machine Learning Linear Regression Project for Beginners in Python to Build a Multiple Linear Regression Model on Soccer Player Dataset.

Ecommerce product reviews - Pairwise ranking and sentiment analysis
This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

Build a Autoregressive and Moving Average Time Series Model
In this time series project, you will learn to build Autoregressive and Moving Average Time Series Models to forecast future readings, optimize performance, and harness the power of predictive analytics for sensor data.

Build Time Series Models for Gaussian Processes in Python
Time Series Project - A hands-on approach to Gaussian Processes for Time Series Modelling in Python

Azure Deep Learning-Deploy RNN CNN models for TimeSeries
In this Azure MLOps Project, you will learn to perform docker-based deployment of RNN and CNN Models for Time Series Forecasting on Azure Cloud.

Time Series Project to Build a Multiple Linear Regression Model
Learn to build a Multiple linear regression model in Python on Time Series Data