In the scripts package, create a new Python file named train.py. We will start by defining some parameters as follows:
import tensorflow as tf import os import sys from datetime import datetime from tensorflow.python.ops import data_flow_ops import nets import models from utils import lines_from_file from datasets import sample_videos, input_pipeline # Dataset num_frames = 16 train_folder = "/home/ubuntu/datasets/ucf101/train/" train_txt = "/home/ubuntu/datasets/ucf101/train.txt" # Learning rate initial_learning_rate = 0.001 decay_steps = 1000 decay_rate = 0.7 # Training image_size = 112 batch_size = 24 num_epochs = 20 epoch_size = 28747 train_enqueue_steps = 100 min_queue_size = 1000 save_steps = 200 # Number ...