All we need to worry about _sass/_highlights.scss
.
First visit This web page to see live example.
Copy the following piece of code and paste or replace all code there in _highlights.scss
file.
highlight {
background-color: #ffffff;
import tensorflow as tf | |
# https://github.com/tensorflow/tensorflow/issues/55646 | |
def unique_uniform(num_samples, | |
minval, | |
maxval, | |
seed, | |
shape, | |
dtype): # maxval is inclusive |
""" | |
pip install tensorflow | |
pip install tf2onnx keras2onnx onnxmltools | |
""" | |
import os | |
import pdb | |
import json | |
import traceback | |
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" |
import tensorflow as tf | |
# credit: https://stackoverflow.com/a/66524901/9215780 | |
class CustomTrainStep(tf.keras.Model): | |
def __init__(self, n_gradients, *args, **kwargs): | |
super().__init__(*args, **kwargs) | |
self.n_gradients = tf.constant(n_gradients, dtype=tf.int32) | |
self.n_acum_step = tf.Variable(0, dtype=tf.int32, trainable=False) | |
self.gradient_accumulation = [tf.Variable(tf.zeros_like(v, dtype=tf.float32), | |
trainable=False) for v in self.trainable_variables] |
All we need to worry about _sass/_highlights.scss
.
First visit This web page to see live example.
Copy the following piece of code and paste or replace all code there in _highlights.scss
file.
highlight {
background-color: #ffffff;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% Matlab code to produce PCA animations shown here: | |
% http://stats.stackexchange.com/questions/2691 | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% Static image | |
clear all | |
rng(42) |
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman