/char-rnn-tensorflow

코드를 간결하게 정리하고 한글주석을 추가한 Char-RNN

Primary LanguagePythonMIT LicenseMIT

char-rnn-tensorflow

코드를 간결하게 정리하고 한글주석을 추가한 Char-RNN

실행법(Howo to run)

python train.py

구조설명

  • train.py - Char-RNN 모델 학습 및 샘플링
  • utils.py - 학습데이터(input.txt)를 읽고 전처리하기 위한 유틸리티 함수들이 정의된 python 스크립트

실혐결과

  • 셰익스피어 희곡 <리처드 3세>를 이용해서 학습하고 샘플링한 결과 중 일부 발췌
First Lord:
Or Ray Cluicians? you appeace, advain.

Shepherd:
Then? Who do valiantage, the trail swoed's Englong
Offords in you, why this paliancac's.

KING RICHARD III:
O, and his in plawful your joyters.

First MuntaSTsa:
All
If I sir? I'll none may to see Zhose than saught;
Beven play'st scalk in Rich,
I dolicides are when I mays good friend;
Hath no sunbs her side to lip him; for you,
And she offendeed: I dear, alome no;
Have their leave his briefer's proceasing in these
his sain whice captas wind supposent.
And such I showners of ever my lease be sing
A fall before the base grown for Edward these comprace.

BENVOLIO:
Have action, Ant confeigh'd.

ANGELO:
That you say go may truon a have lender mother suffe:
How shord, as mengef, King side Lancast, may.

First Duky you, my raz?
  • <Linux 소스코드>를 이용해서 학습하고 샘플링한 결과 중 일부 발췌
void graph_index(struct hrtime_hardetr, bolaction, struct hectx *tsk)
{
    struct plog_batch;
    get_rrgbum_shifock_remove_elaper(L)) {
        dr.name_graph(return, tsk);
            if (index = &bay->count - (smap, hardid_usigned && tr->sched_name && ~SUPTION_BT(032))
        return 1;

    raw_spin_unlock(dstat_val)))
        return -EINVAL;
        i+++)
                        return -EINVA;
}

static inline bufferpoid(tp, char *timer, struct rq *rq)
{ }
#else
    return rq->ret_module_aps(p, i) gore, &path) &   " factive it rcu\bled tsk0.
         *
                 * Arce a dis:
        return error = 1;
    retuct task_next;

    if (hadd_piocup.ext, sizeof(queued);
            result = &context->trace_hung_twueued entry->graph_find_rmatf("Tode, infags or */
        return prink;

        timekeeping_write(, p2))
            return;
    }

Reference(Original Code)

https://github.com/sherjilozair/char-rnn-tensorflow