This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
"""PTB 텍스트 파일을 파싱(parsing)하기 위한 유틸리티들(Utilities).""" | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
import collections | |
import os | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
"""Example / benchmark for building a PTB LSTM model. | |
Trains the model described in: | |
(Zaremba, et. al.) Recurrent Neural Network Regularization | |
http://arxiv.org/abs/1409.2329 | |
There are 3 supported model configurations: | |
=========================================== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Inception v3 architecture 모델을 retraining한 모델을 이용해서 이미지에 대한 추론(inference)을 진행하는 예제""" | |
import numpy as np | |
import tensorflow as tf | |
imagePath = '/tmp/test_chartreux.jpg' # 추론을 진행할 이미지 경로 | |
modelFullPath = '/tmp/output_graph.pb' # 읽어들일 graph 파일 경로 | |
labelsFullPath = '/tmp/output_labels.txt' # 읽어들일 labels 파일 경로 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
"""Inception v3 architecture 모델을 이용한 간단한 Transfer Learning (TensorBoard 포함) | |
This example shows how to take a Inception v3 architecture model trained on | |
ImageNet images, and train a new top layer that can recognize other classes of | |
images. | |
The top layer receives as input a 2048-dimensional vector for each image. We | |
train a softmax layer on top of this representation. Assuming the softmax layer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Log a LogRecord. | |
* <p> | |
* All the other logging methods in this class call through | |
* this method to actually perform any logging. Subclasses can | |
* override this single method to capture all log activity. | |
* | |
* @param record the LogRecord to be published | |
*/ | |
public void log(LogRecord record) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Logger { | |
public static int ERR = 3; | |
public static int NOTICE = 5; | |
public static int DEBUG = 7; | |
protected int mask; | |
// The next element in the chain of responsibility | |
protected Logger next; | |
public Logger setNext(Logger log) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# Convolutional Neural Networks(CNNs)를 이용한 Deep MNIST 분류기(Classifier) | |
# 절대 임포트 설정 | |
from __future__ import absolute_import | |
from __future__ import division | |
from __future__ import print_function | |
# 필요한 라이브러리들을 임포트 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# MNIST 숫자 분류를 위한 Stacked AutoEncoder 예제 | |
# 절대 임포트 설정 | |
from __future__ import division, print_function, absolute_import | |
# 필요한 라이브러리들을 임포트 | |
import tensorflow as tf | |
import numpy as np |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ----------------------------------- | |
// 1. Get today's date | |
LocalDate today = LocalDate.now(); | |
System.out.println("Today's Local date : " + today); | |
// Output : Today's Local date : 2014-01-14 | |
// ----------------------------------- | |
// 2. Get today's year, month, and day |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Traditional Method | |
public static void main(String[] args) { | |
List<String> lines = Arrays.asList("apple", "banana", "grape"); | |
List<String> result = getFilterOutput(lines, "grape"); | |
for (String temp : result) { | |
System.out.println(temp); //output : apple, banana | |
} | |
} |