Skip to content

Instantly share code, notes, and snippets.

View pknotfound's full-sized avatar
🍄
Learning & Exploring

Priyansh Kedia pknotfound

🍄
Learning & Exploring
View GitHub Profile
@pknotfound
pknotfound / ReLu Activation plot
Created May 19, 2021 19:16
Code for ReLu activation plot using matplotlib
from matplotlib import pyplot
def rectified(x):
return max(0.0, x)
series_in = [x for x in range(-100, 101)]
series_out = [rectified(x) for x in series_in]
pyplot.plot(series_in, series_out)
pyplot.show()
@pknotfound
pknotfound / sigmoid
Created May 19, 2021 10:03
Plot the sigmoid function along with its derivative
import numpy as np
import matplotlib.pyplot as plt
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def derivative(x, step):
return (sigmoid(x+step) - sigmoid(x)) / step
x = np.linspace(-10, 10, 1000)
@pknotfound
pknotfound / data.csv
Created January 18, 2020 09:53
BarChartD3
country population
China 1415046
India 1354052
United States 326767
Indonesia 266795
Brazil 210868
Pakistan 200814
Nigeria 195875
Bangladesh 166368
Russia 143965