Skip to content

Instantly share code, notes, and snippets.

View lijiansong's full-sized avatar
🛠️
造轮子...

Json Lee lijiansong

🛠️
造轮子...
View GitHub Profile
@lijiansong
lijiansong / mandelbrot.md
Created June 2, 2021 11:45 — forked from mrange/mandelbrot.md
The Computer Language Benchmarks Game - Mandelbrot

The Computer Language Benchmarks Game - Mandelbrot

Source code: https://github.com/mrange/benchmarksgame/tree/master/src/mandelbrot

  1. Update 2017-06-25 - Decided I could do a bit better with F# so I added an improved F# program that uses the .NET SSE
  2. Update 2017-07-01 - Reduced the overhead of bitmap allocation saving 9ms for 16000x16000 bitmaps
  3. Update 2017-07-06 - Improved the fast F# program by removing overy redundancy

Recently I discovered The Computer Language Benchmarks Game which intrigued me, especially the mandelbrot version.

@lijiansong
lijiansong / checkmate_tutorial_basic_tf2_example.ipynb
Last active May 8, 2021 01:18
tutorial_basic_tf2_example.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
name: "squeezenet"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 227
dim: 227
}
layer {
import math
import datetime
from tqdm import tqdm
import pandas as pd
import numpy as np
import tensorflow as tf
"""TensorFlow 2.0 implementation of vanilla Autoencoder."""
import numpy as np
import tensorflow as tf
__author__ = "Abien Fred Agarap"
np.random.seed(1)
tf.random.set_seed(1)
batch_size = 128
epochs = 10

Build TF 2.0 from source

Step 1:

从anaconda的base环境中创建新的环境:

$ conda create -n tf2-source python=3.6
$ conda activate tf2-source
name: "ZF"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 720 #770 725
dim: 1280 #683 1285
}
input: "im_info"
name: "MOBILENET"
layer {
name: "data"
type: "Input"
top: "data"
input_param {
shape: {
dim: 1
dim: 3
dim: 224
name: "ResNet-50"
input: "data"
input_shape{
dim: 1
dim: 3
dim: 224
dim: 224
}
layer {
name: "DENSENET_121"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
layer {
name: "conv1"