Action | tmux | screen |
---|---|---|
start a new session | tmux tmux new tmux new-session |
screen |
start a new session with a name | tmux new -s name | screen -S name |
re-attach a detached session | tmux attach tmux attach-session |
screen -r |
re-attach a detached session with a name | tmux attach -t name tmux a -t name |
screen -r name |
re-attach an attached session (detaching it from elsewhere) | tmux attach -dtmux attach-session -d | screen -dr |
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 gym | |
import tensorflow as tf | |
import numpy as np | |
import itertools | |
import tensorflow.contrib.layers as layers | |
from tqdm import trange | |
from gym.spaces import Discrete, Box | |
def get_traj(agent, env, max_episode_steps, render, deterministic_acts=False): | |
''' |
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
@classmethod | |
def update_from_checkpoint(Cls, save_folder, network, optimizer=None, | |
use_best=False, use_cpu=False, ignore_layers=tuple()): | |
""" | |
Update network and optimizer(if specified) from the checkpoints in the save folder. | |
If use_best is True then the data is loaded from the Cls.CHECKPOINT_BEST file | |
otherwise the data is loaded from the Cls.CHECKPOINT_LAST file | |
Returns the number of global steps past for the loaded checkpoint. | |
Arguments: | |
save_folder (str): a path to a folder containing summaries and weights |