Skip to content

Instantly share code, notes, and snippets.

View ls-da3m0ns's full-sized avatar

Prashant Singh ls-da3m0ns

View GitHub Profile
@ls-da3m0ns
ls-da3m0ns / Rancer.py
Created January 28, 2021 19:13
data loading script for TFrecords
def to_float32_2(image, label):
max_val = tf.reduce_max(label, axis=-1,keepdims=True)
cond = tf.equal(label, max_val)
label = tf.where(cond, tf.ones_like(label), tf.zeros_like(label))
return tf.cast(image, tf.float32), tf.cast(label, tf.int32)
def to_float32(image, label):
return tf.cast(image, tf.float32), label
def decode_image(image_data):
@ls-da3m0ns
ls-da3m0ns / radiation_prediction.ipynb
Created January 28, 2021 18:50
radiation_prediction.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.