Skip to content

Instantly share code, notes, and snippets.

View AdityaKane2001's full-sized avatar
💻
Attending one token at a time.

Aditya Kane AdityaKane2001

💻
Attending one token at a time.
View GitHub Profile
"""Script to make and save TFRecords from ImageNet files"""
import tensorflow as tf
import os
import random
import json
import math
import time
from .image_utils import *
@AdityaKane2001
AdityaKane2001 / tensorboard_logs.ipynb
Last active June 29, 2021 11:16
TensorBoard_logs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AdityaKane2001
AdityaKane2001 / imagenet_dir.txt
Created July 25, 2021 06:12
This gist contains a tree view of the ImageNet directory structure
.
├── train/
│ ├── n01440764/
│ │ ├── n01440764_001.JPEG
│ │ ├── n01440764_002.JPEG
│ │ └── ...
│ ├── n01943899/
│ │ └── ...
│ ├── n02105056/
│ │ └── ...
@AdityaKane2001
AdityaKane2001 / keras-build-test-notebook.ipynb
Created September 15, 2021 08:52
Keras build test notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#Install the latest version of Bazel. At the time of writing, the latest version was 4.2.1.
wget https://github.com/bazelbuild/bazel/releases/download/4.2.1/bazel-4.2.1-installer-linux-x86_64.sh
chmod +x bazel-4.2.1-installer-linux-x86_64.sh
./bazel-4.2.1-installer-linux-x86_64.sh
export PATH="$PATH:$HOME/bin"
bazel
mkdir keras_installation
cd keras_installation
mkdir keras_env
python3 -m venv keras_env
source keras_env/bin/activate
# Replace BRANCH and USERNAME with your branch name and GitHub username respectively
git clone -b BRANCH https://github.com/USERNAME/keras.git
cd keras
pip install -r requirements.txt
pip uninstall -y keras-nightly
pip install --upgrade tf-nightly
.
└── keras/
├── api/
│ ├── BUILD
│ └── api_init_files.bzl
├── ...
└── <submodule name>/
└── BUILD
# Make sure you run the following command from the root of your Keras fork
# Note: The version 2.8.0 can change with changes in Keras versions.
bazel build //keras/tools/pip_package:build_pip_package
~/keras_installation/keras/bazel-bin/keras/tools/pip_package/build_pip_package ~/keras_installation/keras_pkg
pip3 install - force-reinstall - user ~/keras_installation/keras_pkg/keras-2.8.0-py2.py3-none-any.whl
bazel test keras/layers/convolutional_test