This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To visualize freezed Tensorflow model file use Tensorboard: | |
- Download import_pb_to_tensorboard.py (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/tools/import_pb_to_tensorboard.py) | |
- Create a directory (/path/to/tmp/folder) where intermediate files will be created to visualize model in Tensorboard. | |
- Execute | |
- python import_pb_to_tensorboard.py --model_dir="/path/to/folder/tensorflow_model_frozen.pb" --log_dir="/path/to/tmp/folder" | |
NOTE: Wrapped values to param # model_dir and param # log_dir in "". Otherwise it might not work. | |
- tensorboard --logdir="/path/to/tmp/folder" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ref: https://www.gnu.org/software/make/manual/html_node/Setting.html#Setting | |
######## | |
# Setting variables: | |
# ?= Set variable if it is empty | |
# := Expand value variable before assignment, | |
# NOTE: (1) The behaviour of ::= is same as := | |
# (2) Expansion of value variable will be only once at the of value assignment. | |
# = Simple variable assignment, value will evaluated/expanded on its usage | |
# += Append value to variable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GLOBAL_VAR=GOLBAL_VAR_VALUE # This value will be set as it is global | |
export GLOBAL_VAR_EXPORT=GLOBAL_VAR_EXPORT_VALUE # This value will be set as it is global | |
# @$(foreach var, $(filter GB_ENV_%, $(.VARIABLES)), $(eval export $(subst GB_ENV_,,$(var))=$($(var)))) | |
all: | |
# Following two vars remain unset as Makefile doesn't set var under phony target | |
@LOCAL_VAR=LOCAL_VAR_VALUE | |
@export LOCAL_VAR_EXPORT=LOCAL_VAR_EXPORT_VALUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Commands are tested on Ubuntu 14.04 | |
# | |
# Install the python3 as Ubuntu 14.04 comes with Python2 | |
sudo apt-get update -y && \ | |
sudo apt-get install python-pip python3 python3-pip | |
# Let's manage two versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Commands are tested on Ubuntu 14.04 | |
# | |
# Issue following command to verify which GCC version is installed | |
gcc --version | |
--- OR --- | |
g++ --version | |
gcc (Ubuntu 4.8.5-4ubuntu8~14.04.2) 4.8.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Incase you are interested to find out docker short, full id, hostname and ip address | |
# of the running container, execute following commands from inside of your container | |
# To find out docker container id (short form) | |
DOCKER_ID=`cat /etc/hostname` | |
echo $DOCKER_ID | |
# To find out docker container host name using /etc/hosts | |
HOST_NAME=`grep $DOCKER_ID /etc/hosts | sed 's/\s/\n/g' | tail -1` | |
# - grep: search for the line having docker id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To convert dts file into dtb | |
<kernel-source>/scripts/dtc/dtc -I dts -O dtb <dts_file> -o <dtb_file> | |
# To convert dtb to dts | |
<kernel-source>/scripts/dtc/dtc -I dtb -O dts <dtb_file> -o <dts_file> | |
# Both of above commands are using dtc built with linux kernel source. | |
# However you can also use dtc binary comes with ubuntu packages. For this you | |
# need to install following package: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In case you are having ldconfig error in Ubuntu 14.04.5 LTS related to Nvidia EGL use follow fixes | |
Error | |
--- | |
/sbin/ldconfig.real: /usr/lib/nvidia-384/libEGL.so.1 is not a symbolic link | |
/sbin/ldconfig.real: /usr/lib32/nvidia-384/libEGL.so.1 is not a symbolic link | |
Fix | |
--- | |
sudo mv /usr/lib/nvidia-384/libEGL.so.1 /usr/lib/nvidia-384/libEGL.so.1.org |