Skip to content

Instantly share code, notes, and snippets.

View aicentral's full-sized avatar

Ahmed Ibrahim aicentral

View GitHub Profile
@aicentral
aicentral / cifar10_allcnn.py
Created January 20, 2017 21:36 — forked from nervanazoo/cifar10_allcnn.py
neon all cnn cifar10 implementation
#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2015 Nervana Systems Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@aicentral
aicentral / GradientDescent.py
Created February 12, 2017 19:37
Gradient Descent
# Simple implementation for the example in page 96 in http://www.deeplearningbook.org/contents/numerical.html
# 4.5 Example: Linear Least Squares
import numpy as np
X=np.random.rand(2,1)
sigma=0.000001
epslon=0.03
A=np.array([[1,2],[3,4]])
B=np.array([1,1])
def gradient(A,X,B):
return np.dot(np.dot(np.transpose(A),A),X)-np.dot(np.transpose(A),B)
@aicentral
aicentral / depth_using_midas.py
Created March 10, 2022 20:06
Depth estimation using Midas model
import torch
from torchvision.transforms import Compose, ToTensor, Resize
from torchvision.datasets import ImageFolder
from torch.utils.data import DataLoader
import matplotlib.pyplot as plt
import torch
import os
import numpy as np
@aicentral
aicentral / ml_simplified.ipynb
Created January 1, 2023 13:57
ML_simplified.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.