Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
import typing | |
import tensorflow as tf | |
import numpy as np | |
from tensorflow import keras | |
from tensorflow.keras.models import Sequential, Model | |
from tensorflow.keras.layers import Dense, Activation, Dropout, Dot, Flatten | |
from tensorflow.keras.layers import Layer, Input, Lambda | |
from tensorflow.keras import backend as K | |
from tensorflow.keras import layers |
This file contains 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
"""An implementation of Decaying Dropout Layer.""" | |
import typing | |
import keras.backend as K | |
from keras.engine import Layer | |
class DecayingDropoutLayer(Layer): | |
""" | |
Layer that processes dropout with exponential decayed keep rate during |
This file contains 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
import pandas as pd | |
import tensorflow as tf | |
from sklearn import datasets | |
from tensorflow.contrib.estimator import InMemoryEvaluatorHook | |
def input_fn(df, batch_size, train=True): | |
dataset = tf.data.Dataset.from_tensor_slices((df.as_matrix(), df.target.as_matrix().astype("int"))) | |
if train: |
This file contains 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
import re | |
def process_raw_words(words, endtag='-'): | |
'''把单词分割成最小的符号,并且加上结尾符号''' | |
vocabs = {} | |
for word, count in words.items(): | |
# 加上空格 | |
word = re.sub(r'([a-zA-Z])', r' \1', word) | |
word += ' ' + endtag | |
vocabs[word] = count | |
return vocabs |
This file contains 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
default 17:59:37.265602 +0900 Bilibili [Downloader] init | |
default 17:59:37.268242 +0900 Bilibili [Downloader] video name 骑士&魔法 : 第8话 Secret&Quest 番剧 bilibili 哔哩哔哩弹幕视频网 | |
default 17:59:37.268347 +0900 Bilibili [Downloader] New Task CID: 22257880 | |
default 17:59:37.275273 +0900 Bilibili TIC TCP Conn Start [76:0x618000192890] | |
default 17:59:37.275273 +0900 Bilibili TIC TCP Conn Start [77:0x610000396310] | |
default 17:59:37.282354 +0900 Bilibili TIC TCP Conn Event [76:0x618000192890]: 1 Err(0) | |
default 17:59:37.282378 +0900 Bilibili TIC TCP Conn Connected [76:0x618000192890]: Err(0) | |
default 17:59:37.282488 +0900 Bilibili TIC Enabling TLS [76:0x618000192890] | |
default 17:59:37.283372 +0900 Bilibili TIC TCP Conn Event [77:0x610000396310]: 1 Err(0) | |
default 17:59:37.283397 +0900 Bilibili TIC TCP Conn Connected [77:0x610000396310]: Err(0) |
This file contains 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
Homebrew build logs for macvim on OS X 10.11.3 | |
Build date: 2016-02-22 11:11:38 |