Skip to content

Instantly share code, notes, and snippets.

@ororox
ororox / Conv2D_Flatten_Dense_layers.py
Created February 18, 2021 02:32
Conv2D, Flatten, Dense
import tensorflow as tf
model = tf.keras.models.Sequential([
tf.keras.layers.Conv2D(16, (3,3), activation='relu', input_shape=(300, 300, 3)),
tf.keras.layers.MaxPooling2D(2, 2),
tf.keras.layers.Conv2D(32, (3,3), activation='relu'),
tf.keras.layers.MaxPooling2D(2,2),
tf.keras.layers.Conv2D(64, (3,3), activation='relu'),
tf.keras.layers.MaxPooling2D(2,2),
tf.keras.layers.Conv2D(64, (3,3), activation='relu'),
@ororox
ororox / MNIST_FASION_MNIST_myCallback.py
Last active February 18, 2021 02:06
MNIST, FASION_MNIST, myCallback
import tensorflow as tf
print(tf.__version__)
class myCallback(tf.keras.callbacks.Callback):
def on_epoch_end(self, epoch, logs={}):
if(logs.get('acc')>=0.90):
print("\nReached 90% accuracy so cancelling training!")
self.model.stop_training = True
#mnist = tf.keras.datasets.fashion_mnist
@ororox
ororox / JavaRunner02.java
Last active September 18, 2020 01:16
자바 연습문제 풀이 3
public class JavaRunner02 {
public static void main(String[] args) {
/* 입력부 */
int firstNumber = 2;
int secondNumber = 3;
/* 출력변수 */
@ororox
ororox / JavaRunner01.java
Created September 18, 2020 01:04
자바 연습문제 풀이 2
public class JavaRunner01 {
public static void main(String[] args) {
/* 입력부 */
int firstNumber = 2;
/* 출력변수 */
String prtStr = null;
@ororox
ororox / JavaRunner.java
Last active October 3, 2020 06:34
자바 연습문제 풀이 1
public class JavaRunner {
public static void main(String[] args) {
/* 입력부 */
// 현재는 내부에 있으나, 향후 사용자 입력을 받을 예정
int firstNumber = 2;
int secondNumber = 3;
/* 연산부 */