Skip to content

Instantly share code, notes, and snippets.

View sainisanjay's full-sized avatar

Sanjay Saini sainisanjay

  • Harman
View GitHub Profile
@sainisanjay
sainisanjay / tensorflow_rename_variables.py
Created March 25, 2021 06:29 — forked from batzner/tensorflow_rename_variables.py
Small python script to rename variables in a TensorFlow checkpoint
import sys, getopt
import tensorflow as tf
usage_str = 'python tensorflow_rename_variables.py --checkpoint_dir=path/to/dir/ ' \
'--replace_from=substr --replace_to=substr --add_prefix=abc --dry_run'
def rename(checkpoint_dir, replace_from, replace_to, add_prefix, dry_run):
checkpoint = tf.train.get_checkpoint_state(checkpoint_dir)
@sainisanjay
sainisanjay / Makefile
Created February 17, 2018 13:43 — forked from kevinhughes27/Makefile
g++ Makefile for OpenCV Project
CC = g++
CFLAGS = -g -Wall
SRCS = HelloWorld.cpp
PROG = HelloWorld
OPENCV = `pkg-config opencv --cflags --libs`
LIBS = $(OPENCV)
$(PROG):$(SRCS)
$(CC) $(CFLAGS) -o $(PROG) $(SRCS) $(LIBS)