Skip to content

Instantly share code, notes, and snippets.

View ashwanirathee's full-sized avatar
☀️
day

Ashwani Rathee ashwanirathee

☀️
day
View GitHub Profile
@ashwanirathee
ashwanirathee / Test.jl
Created March 25, 2021 18:11
Image Morphology Test
using BenchmarkTools
using ImageMorphology, TestImages,ColorTypes
function test()
img = TestImages.shepp_logan(512);
img_erode = Gray.(img); # keeps white objects white
img_erosion1 = erode(img_erode)
end
test()
@ashwanirathee
ashwanirathee / morphology_test_512.jl
Created March 23, 2021 14:32
Test Image for JuliaImages
# MIT License
begin
using Luxor, Random, Colors
Drawing(512, 512, "hello-world.png")
background("black")
sethue("white")
translate(50, 50)
radius = 30
grid = GridHex(O, radius, 2)
@ashwanirathee
ashwanirathee / Basic-Neuron-Layer.jl
Created December 17, 2020 03:38
Blog Post 1 Contents
inputs = [1.0, 2.0, 3.0]
weights1 = [0.2, 0.8, -0.5, 1.0]
weights2 = [0.5, -0.91, 0.26, -0.5]
bias1 = 2.0
bias2 = 3.0
output = [inputs[1]*weights1[1] + inputs[2]*weights1[2] + inputs[3]*weights1[3] + inputs[4]*weights1[4] + bias1,
inputs[1]*weights2[1] + inputs[2]*weights2[2] + inputs[3]*weights2[3] + inputs[4]*weights2[4] + bias2]
"""
Sigmoid activation function
"""
function sigmoid(Z)
A = 1 ./ (1 .+ exp.(.-Z))
return (A = A, Z = Z)
end
"""