Skip to content

Instantly share code, notes, and snippets.

@CihanSoylu
CihanSoylu / conda
Created January 11, 2020 22:43
Useful conda commands
#List conda environments
conda env list
#Activate an environment
conda activate <env_name>
#Deactivate an environment
conda deactivate
#Create an environment
@CihanSoylu
CihanSoylu / tensorflow_probability.ipynb
Last active January 11, 2020 23:03
tensorflow_probability.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CihanSoylu
CihanSoylu / tfrecords-and-tf-train-example.ipynb
Last active July 5, 2024 08:44
TFrecords and tf.train.Example.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CihanSoylu
CihanSoylu / features.py
Created July 17, 2019 13:04
The functions provided by Tensorflow to create tf.train.Feature protocol buffer messages
def _bytes_feature(value):
"""Returns a bytes_list from a string / byte."""
# If the value is an eager tensor BytesList won't unpack a string from an EagerTensor.
if isinstance(value, type(tf.constant(0))):
value = value.numpy()
return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value]))
def _float_feature(value):
"""Returns a float_list from a float / double."""
return tf.train.Feature(float_list=tf.train.FloatList(value=[value]))
@CihanSoylu
CihanSoylu / visualizing-the-non-linearity-of-neural-networks.ipynb
Last active February 16, 2022 08:22
Visualizing the non-linearity of neural networks.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.