Notice
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- ubuntu
- dlib
- keras
- raspberry pi
- colab
- object detection
- colaboratory
- error
- gpu memory
- install
- windows
- TensorFlow
- Anaconda
- CUDA
- urllib
- dataset
- linux
- 딥러닝
- Deep Learning
- shakeratos
- YouTube 8M
- Jupyter notebook
- pyTorch
- python
- FIle
- Windows 10
- python3
- face_recognition
- ppc64le
- download
Archives
- Today
- Total
Shakerato
YouTube8M simplest model to train 본문
Add below code into the "/youtube-8m-master/video_level_models.py"
You can run this code from console(terminal). I use Windows PowerShell.
python train.py --feature_names='mean_rgb,mean_audio' --feature_sizes='1024,128' --model='MyModel' --train_data_pattern=C:/Users/yoon/Desktop/youtube8m/yt8m/v2/video/train*.tfrecord --train_dir C:/Users/yoon/Desktop/youtube8m/yt8m/v2/models/video/sample_model --start_new_model
class MyModel(models.BaseModel):
""" Simple Neural Network."""
def create_model(self, model_input, vocab_size, l2_penalty=1e-8, **unused_params):
"""Creates a my model.
Args:
model_input: 'batch' x 'num_features' matrix of input features.
vocab_size: The number of classes in the dataset.
Returns:
A dictionary with a tensor containing the probability predictions of the
model in the 'predictions' key. The dimensions of the tensor are
batch_size x num_classes."""
W1 = tf.Variable(tf.random_normal([1152,2048], stddev=0.01))
L1 = tf.nn.relu(tf.matmul(model_input, W1))
W2 = tf.Variable(tf.random_normal([2048,4096], stddev=0.01))
L2 = tf.nn.relu(tf.matmul(L1, W2))
W3 = tf.Variable(tf.random_normal([4096, vocab_size], stddev=0.01))
output = tf.matmul(L2, W3)
output = tf.nn.softmax(output)
return {"predictions": output}
'Research' 카테고리의 다른 글
Android Studio Uninstall All Files (0) | 2018.06.20 |
---|---|
Install PyTorch using Anaconda on Windows 10 (0) | 2018.06.10 |
YouTube-8M dataset file renaming for avoiding duplicate file names in Windows (Python code) (0) | 2018.06.06 |
YouTube 8M dataset download (0) | 2018.06.01 |
Python code to download file on the internet using urllib library (python 3) (0) | 2018.06.01 |
Comments