All Projects → prakashjayy → Tensorflow

prakashjayy / Tensorflow

This Repository contains all tensorflow tutorials.

Projects that are alternatives of or similar to Tensorflow

Modelsgenesis
Official Keras & PyTorch Implementation and Pre-trained Models for Models Genesis - MICCAI 2019
Stars: ✭ 416 (+511.76%)
Mutual labels:  jupyter-notebook, transfer-learning
Skin Cancer Image Classification
Skin cancer classification using Inceptionv3
Stars: ✭ 16 (-76.47%)
Mutual labels:  jupyter-notebook, transfer-learning
Video Classification
Tutorial for video classification/ action recognition using 3D CNN/ CNN+RNN on UCF101
Stars: ✭ 543 (+698.53%)
Mutual labels:  jupyter-notebook, transfer-learning
Amazon Forest Computer Vision
Amazon Forest Computer Vision: Satellite Image tagging code using PyTorch / Keras with lots of PyTorch tricks
Stars: ✭ 346 (+408.82%)
Mutual labels:  jupyter-notebook, transfer-learning
Average Word2vec
🔤 Calculate average word embeddings (word2vec) from documents for transfer learning
Stars: ✭ 52 (-23.53%)
Mutual labels:  jupyter-notebook, transfer-learning
Trainyourownyolo
Train a state-of-the-art yolov3 object detector from scratch!
Stars: ✭ 399 (+486.76%)
Mutual labels:  jupyter-notebook, transfer-learning
Getting Things Done With Pytorch
Jupyter Notebook tutorials on solving real-world problems with Machine Learning & Deep Learning using PyTorch. Topics: Face detection with Detectron 2, Time Series anomaly detection with LSTM Autoencoders, Object Detection with YOLO v5, Build your first Neural Network, Time Series forecasting for Coronavirus daily cases, Sentiment Analysis with BERT.
Stars: ✭ 738 (+985.29%)
Mutual labels:  jupyter-notebook, transfer-learning
Deeppicar
Deep Learning Autonomous Car based on Raspberry Pi, SunFounder PiCar-V Kit, TensorFlow, and Google's EdgeTPU Co-Processor
Stars: ✭ 242 (+255.88%)
Mutual labels:  jupyter-notebook, transfer-learning
Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (-50%)
Mutual labels:  jupyter-notebook, transfer-learning
Densedepth
High Quality Monocular Depth Estimation via Transfer Learning
Stars: ✭ 963 (+1316.18%)
Mutual labels:  jupyter-notebook, transfer-learning
Fast Pytorch
Pytorch Tutorial, Pytorch with Google Colab, Pytorch Implementations: CNN, RNN, DCGAN, Transfer Learning, Chatbot, Pytorch Sample Codes
Stars: ✭ 346 (+408.82%)
Mutual labels:  jupyter-notebook, transfer-learning
Weakly Supervised 3d Object Detection
Weakly Supervised 3D Object Detection from Point Clouds (VS3D), ACM MM 2020
Stars: ✭ 61 (-10.29%)
Mutual labels:  jupyter-notebook, transfer-learning
Ner Bert
BERT-NER (nert-bert) with google bert https://github.com/google-research.
Stars: ✭ 339 (+398.53%)
Mutual labels:  jupyter-notebook, transfer-learning
Xlearn
Transfer Learning Library
Stars: ✭ 406 (+497.06%)
Mutual labels:  jupyter-notebook, transfer-learning
Pytorch Nlp Notebooks
Learn how to use PyTorch to solve some common NLP problems with deep learning.
Stars: ✭ 293 (+330.88%)
Mutual labels:  jupyter-notebook, transfer-learning
Tensorflow 101
TensorFlow 101: Introduction to Deep Learning for Python Within TensorFlow
Stars: ✭ 642 (+844.12%)
Mutual labels:  jupyter-notebook, transfer-learning
Pytorch Retraining
Transfer Learning Shootout for PyTorch's model zoo (torchvision)
Stars: ✭ 167 (+145.59%)
Mutual labels:  jupyter-notebook, transfer-learning
Bert Sklearn
a sklearn wrapper for Google's BERT model
Stars: ✭ 182 (+167.65%)
Mutual labels:  jupyter-notebook, transfer-learning
Seismic Transfer Learning
Deep-learning seismic facies on state-of-the-art CNN architectures
Stars: ✭ 32 (-52.94%)
Mutual labels:  jupyter-notebook, transfer-learning
Neural Painters X
Neural Paiters
Stars: ✭ 61 (-10.29%)
Mutual labels:  jupyter-notebook, transfer-learning

TensorFlow

This Repository contains all tensorflow tutorials . There might be some replicas from other repositories.

Working with Graphs

import tensorflow as tf  
slim = tf.contrib.slim 

# Define a basic graph:
def ciresan(X):
     with slim.arg_scope([slim.conv2d, slim.fully_connected], activation_fn=tf.nn.tanh, weights_initializer=tf.truncated_normal_initializer(stddev=0.01), weights_regularizer=slim.l2_regularizer(0.0005)):
    net = slim.conv2d(X, 32, [4, 4], scope="conv1", padding = "SAME")
    net = slim.max_pool2d(net,[2, 2], scope="pool1", padding = "SAME")
    net = slim.conv2d(X, 48, [5, 5], scope="conv2", padding = "SAME")
    net = slim.max_pool2d(net,[3, 3], scope="pool2", padding = "SAME")
    net = slim.fully_connected(net, 150, scope="fc3")
    net = slim.fully_connected(net, 5, scope="fc4", activation_fn = tf.nn.softmax)
return net

X = tf.placeholder(tf.float32, [None, 224, 224, 3])
net = ciresan(X)

How to save a graph?

import os
with tf.Session() as sess:
    tf.train.write_graph(sess.graph_def, os.getcwd(), "model.pb", as_text = False)

To see what variable names does the model contain

[v.name for v in slim.get_model_variables()]
out:
['conv1/weights:0',
'conv1/biases:0',
'conv2/weights:0',
'conv2/biases:0',
'fc3/weights:0',
'fc3/biases:0',
'fc4/weights:0',
'fc4/biases:0']

To just see the model variables

[<tensorflow.python.ops.variables.Variable at 0x1150f6f60>,
<tensorflow.python.ops.variables.Variable at 0x1150f6e80>,
<tensorflow.python.ops.variables.Variable at 0x1150f6a20>,
<tensorflow.python.ops.variables.Variable at 0x1150f6e48>,
<tensorflow.python.ops.variables.Variable at 0x1150f68d0>,
<tensorflow.python.ops.variables.Variable at 0x1150f6b38>,
<tensorflow.python.ops.variables.Variable at 0x1150f62e8>,
<tensorflow.python.ops.variables.Variable at 0x1151a2ef0>]

To see the operations in the graph (You will see many, so to cut short I have given here only the first string.

sess = tf.Session()
op = sess.graph.get_operations()
[m.values() for m in op][1]
out:
(<tf.Tensor 'conv1/weights:0' shape=(4, 4, 3, 32) dtype=float32_ref>,)

How to internally access a layer (an op ) . We will dicuss about the graph layer

from tensorflow.python.platform import gfile
with tf.Session() as sess:
with gfile.FastGFile("model.pb",'rb') as f:
    graph_def = tf.GraphDef()
    graph_def.ParseFromString(f.read())
    tf.import_graph_def(graph_def, name='')
    po3 = sess.graph.get_tensor_by_name("conv1/weights:0")
    print (po3)
    
out:
Tensor("conv1/weights:0", shape=(4, 4, 3, 32), dtype=float32_ref)

Instead of print(po3) . You can actually print weights by using

print (sess.run(po3, feed_dict={X:images}) # This is how transfer learning works 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].