Skip to content

Instantly share code, notes, and snippets.

View rameshKrSah's full-sized avatar
🎆
Working from home

Ramesh Sah rameshKrSah

🎆
Working from home
View GitHub Profile
@rameshKrSah
rameshKrSah / multi-model-tf.py
Created January 14, 2022 10:23
Multi-Input or Model Learning with TensorFlow
import tensorflow as tf
from tensorflow import keras
# Two inputs - One Output
# Image
input_1 = tf.keras.layers.Input(shape=(28, 28, 1))
conv2d_1 = tf.keras.layers.Conv2D(64, kernel_size=3,
activation=tf.keras.activations.relu)(input_1)
# Second conv layer :
@rameshKrSah
rameshKrSah / tf_dataset.py
Last active June 3, 2023 05:20
Create a TensorFlow dataset from X, Y arrays.
from sklearn.model_selection import train_test_split
import numpy as np
import tensorflow as tf
def create_dataset(X, Y, batch_size):
""" Create train and test TF dataset from X and Y
The prefetch overlays the preprocessing and model execution of a training step.
While the model is executing training step s, the input pipeline is reading the data for step s+1.
AUTOTUNE automatically tune the number for sample which are prefeteched automatically.
@rameshKrSah
rameshKrSah / seaborn_matplot_config.py
Last active January 14, 2022 15:55
Configuration for Seaborn and matplotlib for plotting graphs
import matplotlib.pyplot as plt
# this is the setting for plots for research paper and articles.
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
# Set the global font to be DejaVu Sans, size 10 (or any other sans-serif font of your choice!)
plt.rc('font',**{'family':'sans-serif','sans-serif':['DejaVu Sans'],'size':10})
# Set the font used for MathJax - more on this later
@rameshKrSah
rameshKrSah / gist:04ce74fab36b20ab8dcbfa97aa6547a4
Created October 8, 2018 06:12 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: