Skip to content

Instantly share code, notes, and snippets.

Pre-train Target Unit MAE Epochs
No μ Debye 0.0285 800
Yes μ Debye 0.0261 700
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.
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var imgView: UIImageView!
override func viewDidLoad() {
super.viewDidLoad()
loadSample()
}
@akirasosa
akirasosa / mlSpeedTests.swift
Created November 8, 2017 11:37
Benchmark Core ML model in iOS.
import CoreML
import XCTest
@testable import mlsample
class mlsampleTests: XCTestCase {
override func setUp() {
super.setUp()
}
@akirasosa
akirasosa / MainActivity.kt
Last active September 14, 2018 02:39
Benchmark tensorflow model in Android.
package tfexample.myapp.com.myapplication
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.util.Log
import org.tensorflow.contrib.android.TensorFlowInferenceInterface
import kotlin.system.measureTimeMillis
val modelName = "file:///android_asset/mobile_unet_160_100_100.pb"
@akirasosa
akirasosa / bench.py
Created November 8, 2017 06:52
Benchmark conv block and depthwise conv block.
import time
import numpy as np
from keras import Input
from keras.applications.mobilenet import DepthwiseConv2D
from keras.engine import Model
from keras.layers import Conv2D
batch_num = 16
@akirasosa
akirasosa / keras_prime_number.py
Last active January 3, 2023 16:37
Chalenging to find prime numbers by Keras...
import numpy as np
from keras.layers import Dense, Dropout, Activation
from keras.layers.advanced_activations import PReLU
from keras.models import Sequential
from matplotlib import pyplot as plt
seed = 7
np.random.seed(seed)
num_digits = 14 # binary encode numbers
{
"email": "test@gmail.com",
"email_verified": true,
"family_name": "Sosa",
"gender": "male",
"given_name": "Akira",
"hd": "gmail.com",
"locale": "en",
"name": "Akira Sosa",
"picture": "https://lh3.googleusercontent.com/path/to/photo.jpg",
@akirasosa
akirasosa / gist:6709058
Created September 26, 2013 02:29
It is required before build by gradle on Jenkins.
echo y | ${ANDROID_HOME}/tools/android update sdk -u -a -t platform-tools,build-tools-18.0.1