SYMBOL INDEX (790 symbols across 54 files) FILE: Image Processor/align_images.py function multi_worker (line 19) | def multi_worker(queue): function vis (line 37) | def vis(image_path, r): function detect (line 45) | def detect(model, image_path): function align (line 54) | def align(image, mask_rcnn_res): function pad_image (line 74) | def pad_image(image, side_length=512): function get_largest_bbox (line 90) | def get_largest_bbox(mask): function rotate_image (line 103) | def rotate_image(image, angle, image_centre=None): function make_bb_mask (line 112) | def make_bb_mask(image, top_left, bottom_right): function angle_trunc (line 124) | def angle_trunc(a): function get_tilt (line 130) | def get_tilt(p1, p2, tilt_from='vertical', degrees=True): function get_best_bbox (line 150) | def get_best_bbox(result): class myMaskRCNNConfig (line 161) | class myMaskRCNNConfig(Config): FILE: Image Processor/cv_tools.py function show (line 17) | def show(image: np.ndarray) -> None: function resize (line 28) | def resize(image: np.ndarray, resize_factor=None, resize_to=None) -> np.... function crop (line 62) | def crop(image: np.ndarray, top_left: Tuple[int], bottom_right: Tuple[in... function compute_PCA (line 71) | def compute_PCA(image: np.ndarray, display=False) -> tuple: function threshold (line 98) | def threshold(image: np.ndarray, show_thresholded: bool = False, show_mo... function find_contours (line 126) | def find_contours(image: np.ndarray) -> List[np.ndarray]: function draw_contours (line 142) | def draw_contours(image: np.ndarray, contours: List[np.ndarray]) -> np.n... function draw_lines (line 154) | def draw_lines(image: np.ndarray, lines: List[np.ndarray]) -> np.ndarray: function hough_lines (line 183) | def hough_lines(image: np.ndarray) -> (np.ndarray, List[np.ndarray]): function filter_lines (line 203) | def filter_lines(lines: List[np.ndarray], angle_thresh: list = [(0, 45),... function segment_by_angle_kmeans (line 234) | def segment_by_angle_kmeans(lines: np.ndarray, k: int = 2, **kwargs) -> ... function segmented_intersections (line 268) | def segmented_intersections(lines: np.ndarray) -> List[List[int]]: function intersection (line 281) | def intersection(line1: np.ndarray, line2: np.ndarray) -> List[int]: function filter_intersects (line 303) | def filter_intersects(intersects: List[List[int]], pad_thickness: int, h... function draw_intersections (line 329) | def draw_intersections(image: np.ndarray, intersects: list, pad_thicknes... function pad_to_square (line 348) | def pad_to_square(img, pad_value=0): function find_bbox (line 395) | def find_bbox(contours): function crop_resize (line 411) | def crop_resize(img, resize_size=64, foreground='black', show_bbox=False): FILE: Image Processor/download_utils.py function download_file_from_google_drive (line 3) | def download_file_from_google_drive(id, destination): FILE: Image Processor/mrcnn/config.py class Config (line 17) | class Config(object): method __init__ (line 213) | def __init__(self): method display (line 230) | def display(self): FILE: Image Processor/mrcnn/model.py function log (line 38) | def log(text, array=None): class BatchNorm (line 53) | class BatchNorm(KL.BatchNormalization): method call (line 61) | def call(self, inputs, training=None): function compute_backbone_shapes (line 71) | def compute_backbone_shapes(config, image_shape): function identity_block (line 95) | def identity_block(input_tensor, kernel_size, filters, stage, block, function conv_block (line 130) | def conv_block(input_tensor, kernel_size, filters, stage, block, function resnet_graph (line 171) | def resnet_graph(input_image, architecture, stage5=False, train_bn=True): function apply_box_deltas_graph (line 213) | def apply_box_deltas_graph(boxes, deltas): function clip_boxes_graph (line 237) | def clip_boxes_graph(boxes, window): class ProposalLayer (line 255) | class ProposalLayer(KE.Layer): method __init__ (line 270) | def __init__(self, proposal_count, nms_threshold, config=None, **kwargs): method call (line 276) | def call(self, inputs): method compute_output_shape (line 331) | def compute_output_shape(self, input_shape): function log2_graph (line 339) | def log2_graph(x): class PyramidROIAlign (line 344) | class PyramidROIAlign(KE.Layer): method __init__ (line 364) | def __init__(self, pool_shape, **kwargs): method call (line 368) | def call(self, inputs): method compute_output_shape (line 449) | def compute_output_shape(self, input_shape): function overlaps_graph (line 457) | def overlaps_graph(boxes1, boxes2): function detection_targets_graph (line 486) | def detection_targets_graph(proposals, gt_class_ids, gt_boxes, gt_masks,... class DetectionTargetLayer (line 622) | class DetectionTargetLayer(KE.Layer): method __init__ (line 647) | def __init__(self, config, **kwargs): method call (line 651) | def call(self, inputs): method compute_output_shape (line 667) | def compute_output_shape(self, input_shape): method compute_mask (line 676) | def compute_mask(self, inputs, mask=None): function refine_detections_graph (line 684) | def refine_detections_graph(rois, probs, deltas, window, config): class DetectionLayer (line 782) | class DetectionLayer(KE.Layer): method __init__ (line 791) | def __init__(self, config=None, **kwargs): method call (line 795) | def call(self, inputs): method compute_output_shape (line 822) | def compute_output_shape(self, input_shape): function rpn_graph (line 830) | def rpn_graph(feature_map, anchors_per_location, anchor_stride): function build_rpn_model (line 874) | def build_rpn_model(anchor_stride, anchors_per_location, depth): function fpn_classifier_graph (line 900) | def fpn_classifier_graph(rois, feature_maps, image_meta, function build_fpn_mask_graph (line 956) | def build_fpn_mask_graph(rois, feature_maps, image_meta, function smooth_l1_loss (line 1012) | def smooth_l1_loss(y_true, y_pred): function rpn_class_loss_graph (line 1022) | def rpn_class_loss_graph(rpn_match, rpn_class_logits): function rpn_bbox_loss_graph (line 1047) | def rpn_bbox_loss_graph(config, target_bbox, rpn_match, rpn_bbox): function mrcnn_class_loss_graph (line 1076) | def mrcnn_class_loss_graph(target_class_ids, pred_class_logits, function mrcnn_bbox_loss_graph (line 1112) | def mrcnn_bbox_loss_graph(target_bbox, target_class_ids, pred_bbox): function mrcnn_mask_loss_graph (line 1143) | def mrcnn_mask_loss_graph(target_masks, target_class_ids, pred_masks): function load_image_gt (line 1186) | def load_image_gt(dataset, config, image_id, augment=False, augmentation... function build_detection_targets (line 1289) | def build_detection_targets(rpn_rois, gt_class_ids, gt_boxes, gt_masks, ... function build_rpn_targets (line 1445) | def build_rpn_targets(image_shape, anchors, gt_class_ids, gt_boxes, conf... function generate_random_rois (line 1556) | def generate_random_rois(image_shape, count, gt_class_ids, gt_boxes): function data_generator (line 1630) | def data_generator(dataset, config, shuffle=True, augment=False, augment... class MaskRCNN (line 1820) | class MaskRCNN(): method __init__ (line 1826) | def __init__(self, mode, config, model_dir): method build (line 1839) | def build(self, mode, config): method find_last (line 2066) | def find_last(self): method load_weights (line 2095) | def load_weights(self, filepath, by_name=False, exclude=None): method get_imagenet_weights (line 2139) | def get_imagenet_weights(self): method compile (line 2153) | def compile(self, learning_rate, momentum): method set_trainable (line 2201) | def set_trainable(self, layer_regex, keras_model=None, indent=0, verbo... method set_log_dir (line 2238) | def set_log_dir(self, model_path=None): method train (line 2276) | def train(self, train_dataset, val_dataset, learning_rate, epochs, lay... method mold_inputs (line 2378) | def mold_inputs(self, images): method unmold_detections (line 2417) | def unmold_detections(self, detections, mrcnn_mask, original_image_shape, method detect (line 2482) | def detect(self, images, verbose=0): method detect_molded (line 2540) | def detect_molded(self, molded_images, image_metas, verbose=0): method get_anchors (line 2598) | def get_anchors(self, image_shape): method ancestor (line 2620) | def ancestor(self, tensor, name, checked=None): method find_trainable_layer (line 2648) | def find_trainable_layer(self, layer): method get_trainable_layers (line 2657) | def get_trainable_layers(self): method run_graph (line 2669) | def run_graph(self, images, outputs, image_metas=None): function compose_image_meta (line 2725) | def compose_image_meta(image_id, original_image_shape, image_shape, function parse_image_meta (line 2750) | def parse_image_meta(meta): function parse_image_meta_graph (line 2774) | def parse_image_meta_graph(meta): function mold_image (line 2798) | def mold_image(images, config): function unmold_image (line 2806) | def unmold_image(normalized_images, config): function trim_zeros_graph (line 2815) | def trim_zeros_graph(boxes, name='trim_zeros'): function batch_pack_graph (line 2827) | def batch_pack_graph(x, counts, num_rows): function norm_boxes_graph (line 2837) | def norm_boxes_graph(boxes, shape): function denorm_boxes_graph (line 2854) | def denorm_boxes_graph(boxes, shape): FILE: Image Processor/mrcnn/parallel_model.py class ParallelModel (line 22) | class ParallelModel(KM.Model): method __init__ (line 30) | def __init__(self, keras_model, gpu_count): method __getattribute__ (line 41) | def __getattribute__(self, attrname): method summary (line 48) | def summary(self, *args, **kwargs): method make_parallel (line 54) | def make_parallel(self): function build_model (line 128) | def build_model(x_train, num_classes): FILE: Image Processor/mrcnn/utils.py function extract_bboxes (line 34) | def extract_bboxes(mask): function compute_iou (line 60) | def compute_iou(box, boxes, box_area, boxes_area): function compute_overlaps (line 81) | def compute_overlaps(boxes1, boxes2): function compute_overlaps_masks (line 100) | def compute_overlaps_masks(masks1, masks2): function non_max_suppression (line 122) | def non_max_suppression(boxes, scores, threshold): function apply_box_deltas (line 159) | def apply_box_deltas(boxes, deltas): function box_refinement_graph (line 183) | def box_refinement_graph(box, gt_box): function box_refinement (line 209) | def box_refinement(box, gt_box): class Dataset (line 239) | class Dataset(object): method __init__ (line 255) | def __init__(self, class_map=None): method add_class (line 262) | def add_class(self, source, class_id, class_name): method add_image (line 276) | def add_image(self, source, image_id, path, **kwargs): method image_reference (line 285) | def image_reference(self, image_id): method prepare (line 294) | def prepare(self, class_map=None): method map_source_class_id (line 330) | def map_source_class_id(self, source_class_id): method get_source_class_id (line 338) | def get_source_class_id(self, class_id, source): method image_ids (line 345) | def image_ids(self): method source_image_link (line 348) | def source_image_link(self, image_id): method load_image (line 355) | def load_image(self, image_id): method load_mask (line 368) | def load_mask(self, image_id): function resize_image (line 388) | def resize_image(image, min_dim=None, max_dim=None, min_scale=None, mode... function resize_mask (line 495) | def resize_mask(mask, scale, padding, crop=None): function minimize_mask (line 517) | def minimize_mask(bbox, mask, mini_shape): function expand_mask (line 537) | def expand_mask(bbox, mini_mask, image_shape): function mold_mask (line 556) | def mold_mask(mask, config): function unmold_mask (line 560) | def unmold_mask(mask, bbox, image_shape): function generate_anchors (line 583) | def generate_anchors(scales, ratios, shape, feature_stride, anchor_stride): function generate_pyramid_anchors (line 622) | def generate_pyramid_anchors(scales, ratios, feature_shapes, feature_str... function trim_zeros (line 646) | def trim_zeros(x): function compute_matches (line 656) | def compute_matches(gt_boxes, gt_class_ids, gt_masks, function compute_ap (line 715) | def compute_ap(gt_boxes, gt_class_ids, gt_masks, function compute_ap_range (line 754) | def compute_ap_range(gt_box, gt_class_id, gt_mask, function compute_recall (line 778) | def compute_recall(pred_boxes, gt_boxes, iou): function batch_slice (line 803) | def batch_slice(inputs, graph_fn, batch_size, names=None): function download_trained_weights (line 840) | def download_trained_weights(coco_model_path, verbose=1): function norm_boxes (line 853) | def norm_boxes(boxes, shape): function denorm_boxes (line 870) | def denorm_boxes(boxes, shape): function resize (line 887) | def resize(image, output_shape, order=1, mode='constant', cval=0, clip=T... FILE: Image Processor/mrcnn/visualize.py function display_images (line 35) | def display_images(images, titles=None, cols=4, cmap=None, norm=None, function random_colors (line 59) | def random_colors(N, bright=True): function apply_mask (line 72) | def apply_mask(image, mask, color, alpha=0.5): function display_instances (line 83) | def display_instances(image, boxes, masks, class_ids, class_names, function display_differences (line 170) | def display_differences(image, function draw_rois (line 208) | def draw_rois(image, rois, refined_rois, mask, class_ids, class_names, l... function draw_box (line 270) | def draw_box(image, box, color): function display_top_masks (line 282) | def display_top_masks(image, mask, class_ids, class_names, limit=4): function plot_precision_recall (line 305) | def plot_precision_recall(AP, precisions, recalls): function plot_overlaps (line 320) | def plot_overlaps(gt_class_ids, pred_class_ids, pred_scores, function draw_boxes (line 359) | def draw_boxes(image, boxes=None, refined_boxes=None, function display_table (line 461) | def display_table(table): function display_weight_stats (line 475) | def display_weight_stats(model): FILE: Image Processor/setup.py function _parse_requirements (line 16) | def _parse_requirements(file_path): FILE: stylegan2-tpu/align_mammos.py function flipImage (line 12) | def flipImage(image): FILE: stylegan2-tpu/convert_ckpt_to_pkl.py function main (line 17) | def main(): FILE: stylegan2-tpu/convert_pkl_to_ckpt.py function main (line 19) | def main(): FILE: stylegan2-tpu/dataset_tool.py function error (line 27) | def error(msg): class TFRecordExporter (line 33) | class TFRecordExporter: method __init__ (line 34) | def __init__(self, tfrecord_dir, expected_images, print_progress=True,... method close (line 51) | def close(self): method choose_shuffled_order (line 61) | def choose_shuffled_order(self): # Note: Images and labels must be add... method add_image (line 66) | def add_image(self, img): method add_labels (line 89) | def add_labels(self, labels): method __enter__ (line 96) | def __enter__(self): method __exit__ (line 99) | def __exit__(self, *args): class ExceptionInfo (line 104) | class ExceptionInfo(object): method __init__ (line 105) | def __init__(self): class WorkerThread (line 111) | class WorkerThread(threading.Thread): method __init__ (line 112) | def __init__(self, task_queue): method run (line 116) | def run(self): class ThreadPool (line 129) | class ThreadPool(object): method __init__ (line 130) | def __init__(self, num_threads): method add_task (line 140) | def add_task(self, func, args=()): method get_result (line 146) | def get_result(self, func): # returns (result, args) method finish (line 153) | def finish(self): method __enter__ (line 157) | def __enter__(self): # for 'with' statement method __exit__ (line 160) | def __exit__(self, *excinfo): method process_items_concurrently (line 163) | def process_items_concurrently(self, item_iterator, process_func=lambd... function display (line 191) | def display(tfrecord_dir): function extract (line 217) | def extract(tfrecord_dir, output_dir): function compare (line 244) | def compare(tfrecord_dir_a, tfrecord_dir_b, ignore_labels): function create_mnist (line 287) | def create_mnist(tfrecord_dir, mnist_dir): function create_mnistrgb (line 311) | def create_mnistrgb(tfrecord_dir, mnist_dir, num_images=1000000, random_... function create_cifar10 (line 328) | def create_cifar10(tfrecord_dir, cifar10_dir): function create_cifar100 (line 355) | def create_cifar100(tfrecord_dir, cifar100_dir): function create_svhn (line 377) | def create_svhn(tfrecord_dir, svhn_dir): function create_lsun (line 404) | def create_lsun(tfrecord_dir, lmdb_dir, resolution=256, max_images=None): function create_lsun_wide (line 437) | def create_lsun_wide(tfrecord_dir, lmdb_dir, width=512, height=384, max_... function create_celeba (line 482) | def create_celeba(tfrecord_dir, celeba_dir, cx=89, cy=121): function create_from_images (line 500) | def create_from_images(tfrecord_dir, image_dir, shuffle, res_log2=7, res... function create_from_hdf5 (line 539) | def create_from_hdf5(tfrecord_dir, hdf5_filename, shuffle): function execute_cmdline (line 554) | def execute_cmdline(argv): FILE: stylegan2-tpu/dnnlib/submission/internal/local.py class TargetOptions (line 7) | class TargetOptions(): method __init__ (line 8) | def __init__(self): class Target (line 11) | class Target(): method __init__ (line 12) | def __init__(self): method finalize_submit_config (line 15) | def finalize_submit_config(self, submit_config, host_run_dir): method submit (line 19) | def submit(self, submit_config, host_run_dir): FILE: stylegan2-tpu/dnnlib/submission/run_context.py class RunContext (line 23) | class RunContext(object): method __init__ (line 35) | def __init__(self, submit_config: submit.SubmitConfig, config_module: ... method __enter__ (line 57) | def __enter__(self) -> "RunContext": method __exit__ (line 60) | def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> N... method update (line 63) | def update(self, loss: Any = 0, cur_epoch: Any = 0, max_epoch: Any = N... method should_stop (line 74) | def should_stop(self) -> bool: method get_time_since_start (line 78) | def get_time_since_start(self) -> float: method get_time_since_last_update (line 82) | def get_time_since_last_update(self) -> float: method get_last_update_interval (line 86) | def get_last_update_interval(self) -> float: method close (line 90) | def close(self) -> None: method get (line 106) | def get(): FILE: stylegan2-tpu/dnnlib/submission/submit.py class SubmitTarget (line 33) | class SubmitTarget(Enum): class PathType (line 41) | class PathType(Enum): class PlatformExtras (line 53) | class PlatformExtras: method __init__ (line 61) | def __init__(self): class SubmitConfig (line 68) | class SubmitConfig(util.EasyDict): method __init__ (line 91) | def __init__(self): function get_path_from_template (line 120) | def get_path_from_template(path_template: str, path_type: PathType = Pat... function get_template_from_path (line 142) | def get_template_from_path(path: str) -> str: function convert_path (line 148) | def convert_path(path: str, path_type: PathType = PathType.AUTO) -> str: function set_user_name_override (line 155) | def set_user_name_override(name: str) -> None: function get_user_name (line 161) | def get_user_name(): function make_run_dir_path (line 174) | def make_run_dir_path(*paths): function _create_run_dir_local (line 193) | def _create_run_dir_local(submit_config: SubmitConfig) -> str: function _get_next_run_id_local (line 212) | def _get_next_run_id_local(run_dir_root: str) -> int: function _populate_run_dir (line 228) | def _populate_run_dir(submit_config: SubmitConfig, run_dir: str) -> None: function run_wrapper (line 257) | def run_wrapper(submit_config: SubmitConfig) -> None: function submit_run (line 350) | def submit_run(submit_config: SubmitConfig, run_func_name: str, **run_fu... FILE: stylegan2-tpu/dnnlib/tflib/autosummary.py function _create_var (line 46) | def _create_var(name: str, value_expr: TfExpression) -> TfExpression: function get_tpu_summary (line 82) | def get_tpu_summary(model_dir=None): function image_grid (line 93) | def image_grid(input_tensor, grid_shape, image_shape=(32, 32), num_chann... function get_num_replicas (line 144) | def get_num_replicas(): function set_num_replicas (line 148) | def set_num_replicas(n): function _i (line 152) | def _i(x): return tf.transpose(x, [0, 2, 3, 1]) function _o (line 153) | def _o(x): return tf.transpose(x, [0, 3, 1, 2]) function autoimages (line 155) | def autoimages(summary_name, images, grid_shape=None, res=None): function autosummary (line 208) | def autosummary(name: str, value: TfExpressionEx, passthru: TfExpression... function finalize_autosummaries (line 252) | def finalize_autosummaries() -> None: function save_summaries (line 311) | def save_summaries(file_writer, global_step=None): FILE: stylegan2-tpu/dnnlib/tflib/custom_ops.py function _find_compiler_bindir (line 36) | def _find_compiler_bindir(): function _get_compute_cap (line 42) | def _get_compute_cap(device): function _get_cuda_gpu_arch_string (line 49) | def _get_cuda_gpu_arch_string(): function _run_cmd (line 56) | def _run_cmd(cmd): function _prepare_nvcc_cli (line 63) | def _prepare_nvcc_cli(opts): function get_plugin (line 87) | def get_plugin(cuda_file): FILE: stylegan2-tpu/dnnlib/tflib/network.py function import_handler (line 32) | def import_handler(handler_func): class Network (line 38) | class Network: method __init__ (line 76) | def __init__(self, name: str = None, scope: str = None, func_name: Any... method ensure (line 105) | def ensure(self): method _init_fields (line 113) | def _init_fields(self) -> None: method _init_graph (line 139) | def _init_graph(self) -> None: method _init_graph_ (line 143) | def _init_graph_(self) -> None: method reset_own_vars (line 206) | def reset_own_vars(self) -> None: method reset_vars (line 210) | def reset_vars(self) -> None: method reset_trainables (line 214) | def reset_trainables(self) -> None: method get_output_for (line 218) | def get_output_for(self, *in_expr: TfExpression, return_as_list: bool ... method get_var_local_name (line 253) | def get_var_local_name(self, var_or_global_name: Union[TfExpression, s... method find_var (line 259) | def find_var(self, var_or_local_name: Union[TfExpression, str]) -> TfE... method get_var (line 264) | def get_var(self, var_or_local_name: Union[TfExpression, str]) -> np.n... method set_var (line 269) | def set_var(self, var_or_local_name: Union[TfExpression, str], new_val... method __getstate__ (line 274) | def __getstate__(self) -> dict: method __setstate__ (line 286) | def __setstate__(self, state: dict) -> None: method clone (line 320) | def clone(self, name: str = None, **new_static_kwargs) -> "Network": method clone2 (line 326) | def clone2(self, name: str = None, **new_static_kwargs) -> ("Network",... method copy_own_vars_from (line 345) | def copy_own_vars_from(self, src_net: "Network") -> None: method copy_vars_from (line 350) | def copy_vars_from(self, src_net: "Network") -> None: method copy_trainables_from (line 355) | def copy_trainables_from(self, src_net: "Network") -> None: method convert (line 360) | def convert(self, new_func_name: str, new_name: str = None, **new_stat... method setup_as_moving_average_of (line 370) | def setup_as_moving_average_of(self, src_net: "Network", beta: TfExpre... method run (line 382) | def run(self, method list_ops (line 484) | def list_ops(self) -> List[TfExpression]: method list_layers (line 492) | def list_layers(self) -> List[Tuple[str, TfExpression, List[TfExpressi... method print_layers (line 535) | def print_layers(self, title: str = None, hide_layers_with_no_params: ... method setup_weight_histograms (line 564) | def setup_weight_histograms(self, title: str = None) -> None: function _handle_legacy_output_transforms (line 584) | def _handle_legacy_output_transforms(output_transform, dynamic_kwargs): function _legacy_output_transform_func (line 604) | def _legacy_output_transform_func(*expr, out_mul=1.0, out_add=0.0, out_s... FILE: stylegan2-tpu/dnnlib/tflib/ops/fused_bias_act.py function _get_plugin (line 15) | def _get_plugin(): function fused_bias_act (line 34) | def fused_bias_act(x, b=None, axis=1, act='linear', alpha=None, gain=Non... function _fused_bias_act_ref (line 72) | def _fused_bias_act_ref(x, b, axis, act, alpha, gain): function _fused_bias_act_cuda (line 100) | def _fused_bias_act_cuda(x, b, axis, act, alpha, gain): FILE: stylegan2-tpu/dnnlib/tflib/ops/upfirdn_2d.py function _get_plugin (line 14) | def _get_plugin(): function upfirdn_2d (line 19) | def upfirdn_2d(x, k, upx=1, upy=1, downx=1, downy=1, padx0=0, padx1=0, p... function _upfirdn_2d_ref (line 66) | def _upfirdn_2d_ref(x, k, upx, upy, downx, downy, padx0, padx1, pady0, p... function _upfirdn_2d_cuda (line 105) | def _upfirdn_2d_cuda(x, k, upx, upy, downx, downy, padx0, padx1, pady0, ... function filter_2d (line 144) | def filter_2d(x, k, gain=1, data_format='NCHW', impl='cuda'): function upsample_2d (line 169) | def upsample_2d(x, k=None, factor=2, gain=1, data_format='NCHW', impl='c... function downsample_2d (line 202) | def downsample_2d(x, k=None, factor=2, gain=1, data_format='NCHW', impl=... function upsample_conv_2d (line 234) | def upsample_conv_2d(x, w, k=None, factor=2, gain=1, data_format='NCHW',... function conv_downsample_2d (line 296) | def conv_downsample_2d(x, w, k=None, factor=2, gain=1, data_format='NCHW... function _shape (line 337) | def _shape(tf_expr, dim_idx): function _setup_kernel (line 344) | def _setup_kernel(k): function _simple_upfirdn_2d (line 353) | def _simple_upfirdn_2d(x, k, up=1, down=1, pad0=0, pad1=0, data_format='... FILE: stylegan2-tpu/dnnlib/tflib/optimizer.py function all_sum_plain (line 31) | def all_sum_plain(g, colocate=False, *args, **kws): function all_sum_gpu (line 48) | def all_sum_gpu(g, *args, **kws): function all_sum_tpu (line 57) | def all_sum_tpu(g, colocate=True, *args, **kws): function all_sum (line 66) | def all_sum(cores, g, colocate=True, *args, **kws): class Optimizer (line 75) | class Optimizer: method __init__ (line 87) | def __init__(self, method _get_device (line 133) | def _get_device(self, device_name: str): method register_gradients (line 166) | def register_gradients(self, loss: TfExpression, trainable_vars: Union... method apply_updates (line 208) | def apply_updates(self, allow_no_op: bool = False) -> tf.Operation: method reset_optimizer_state (line 319) | def reset_optimizer_state(self) -> None: method get_loss_scaling_var (line 324) | def get_loss_scaling_var(self, device: str) -> Union[tf.Variable, None]: method apply_loss_scaling (line 328) | def apply_loss_scaling(self, value: TfExpression) -> TfExpression: method undo_loss_scaling (line 335) | def undo_loss_scaling(self, value: TfExpression) -> TfExpression: class SimpleAdam (line 343) | class SimpleAdam: method __init__ (line 346) | def __init__(self, name="Adam", learning_rate=0.001, beta1=0.9, beta2=... method variables (line 354) | def variables(self): method compute_gradients (line 357) | def compute_gradients(self, loss, var_list, gate_gradients=tf.train.Op... method apply_gradients (line 361) | def apply_gradients(self, grads_and_vars): FILE: stylegan2-tpu/dnnlib/tflib/tfutil.py function run (line 29) | def run(*args, **kwargs) -> Any: function is_tf_expression (line 35) | def is_tf_expression(x: Any) -> bool: function shape_to_list (line 40) | def shape_to_list(shape: Iterable[tf.Dimension]) -> List[Union[int, None]]: function flatten (line 45) | def flatten(x: TfExpressionEx) -> TfExpression: function log2 (line 51) | def log2(x: TfExpressionEx) -> TfExpression: function exp2 (line 57) | def exp2(x: TfExpressionEx) -> TfExpression: function lerp (line 63) | def lerp(a: TfExpressionEx, b: TfExpressionEx, t: TfExpressionEx) -> TfE... function lerp_clip (line 69) | def lerp_clip(a: TfExpressionEx, b: TfExpressionEx, t: TfExpressionEx) -... function absolute_name_scope (line 75) | def absolute_name_scope(scope: str) -> tf.name_scope: function absolute_variable_scope (line 80) | def absolute_variable_scope(scope: str, **kwargs) -> tf.variable_scope: function _sanitize_tf_config (line 85) | def _sanitize_tf_config(config_dict: dict = None) -> dict: function init_tf (line 108) | def init_tf(config_dict: dict = None) -> None: function assert_tf_initialized (line 136) | def assert_tf_initialized(): function create_session (line 142) | def create_session(config_dict: dict = None, force_as_default: bool = Fa... function init_uninitialized_vars (line 166) | def init_uninitialized_vars(target_vars: List[tf.Variable] = None) -> None: function set_vars (line 197) | def set_vars(var_to_value_dict: dict) -> None: function create_var_with_large_initial_value (line 235) | def create_var_with_large_initial_value(initial_value: np.ndarray, *args... function create_var_with_large_initial_value2 (line 244) | def create_var_with_large_initial_value2(initial_value: np.ndarray, *arg... function convert_images_from_uint8 (line 254) | def convert_images_from_uint8(images, drange=[-1,1], nhwc_to_nchw=False): function convert_images_to_uint8 (line 264) | def convert_images_to_uint8(images, drange=[-1,1], nchw_to_nhwc=False, s... FILE: stylegan2-tpu/dnnlib/tflib/tpu_summaries.py class TpuSummaries (line 57) | class TpuSummaries(object): method __init__ (line 66) | def __init__(self, log_dir, save_summary_steps=32): method image (line 74) | def image(self, name, tensor, reduce_fn): method scalar (line 81) | def scalar(self, name, tensor, reduce_fn=tf.math.reduce_mean): method get_host_call (line 91) | def get_host_call(self): method _host_call_fn (line 101) | def _host_call_fn(self, step, *args): FILE: stylegan2-tpu/dnnlib/util.py class EasyDict (line 36) | class EasyDict(dict): method __getattr__ (line 39) | def __getattr__(self, name: str) -> Any: method __setattr__ (line 45) | def __setattr__(self, name: str, value: Any) -> None: method __delattr__ (line 48) | def __delattr__(self, name: str) -> None: class Logger (line 52) | class Logger(object): method __init__ (line 55) | def __init__(self, file_name: str = None, file_mode: str = "w", should... method __enter__ (line 68) | def __enter__(self) -> "Logger": method __exit__ (line 71) | def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> N... method write (line 74) | def write(self, text: str) -> None: method flush (line 93) | def flush(self) -> None: method close (line 106) | def close(self) -> None: function format_time (line 130) | def format_time(seconds: Union[int, float]) -> str: function ask_yes_no (line 144) | def ask_yes_no(question: str) -> bool: function tuple_product (line 154) | def tuple_product(t: Tuple) -> Any: function get_dtype_and_ctype (line 178) | def get_dtype_and_ctype(type_obj: Any) -> Tuple[np.dtype, Any]: function is_pickleable (line 201) | def is_pickleable(obj: Any) -> bool: function get_module_from_obj_name (line 213) | def get_module_from_obj_name(obj_name: str) -> Tuple[types.ModuleType, s... function get_obj_from_module (line 254) | def get_obj_from_module(module: types.ModuleType, obj_name: str) -> Any: function get_obj_by_name (line 264) | def get_obj_by_name(name: str) -> Any: function call_func_by_name (line 270) | def call_func_by_name(*args, func_name: str = None, **kwargs) -> Any: function get_module_dir_by_obj_name (line 278) | def get_module_dir_by_obj_name(obj_name: str) -> str: function is_top_level_function (line 284) | def is_top_level_function(obj: Any) -> bool: function get_top_level_function_name (line 289) | def get_top_level_function_name(obj: Any) -> str: function list_dir_recursively_with_ignore (line 298) | def list_dir_recursively_with_ignore(dir_path: str, ignores: List[str] =... function copy_files_and_create_dirs (line 331) | def copy_files_and_create_dirs(files: List[Tuple[str, str]]) -> None: function is_url (line 347) | def is_url(obj: Any, allow_file_urls: bool = False) -> bool: function open_url (line 365) | def open_url(url: str, cache_dir: str = None, num_attempts: int = 10, ve... FILE: stylegan2-tpu/encoder/generator_model.py function create_stub (line 8) | def create_stub(name, batch_size): function create_variable_for_generator (line 12) | def create_variable_for_generator(name, batch_size, tiled_dlatent, model... class Generator (line 26) | class Generator: method __init__ (line 27) | def __init__(self, model, batch_size, clipping_threshold=2, tiled_dlat... method reset_dlatents (line 87) | def reset_dlatents(self): method set_dlatents (line 90) | def set_dlatents(self, dlatents): method stochastic_clip_dlatents (line 105) | def stochastic_clip_dlatents(self): method get_dlatents (line 108) | def get_dlatents(self): method get_dlatent_avg (line 111) | def get_dlatent_avg(self): method set_dlatent_avg (line 114) | def set_dlatent_avg(self, dlatent_avg): method reset_dlatent_avg (line 117) | def reset_dlatent_avg(self): method generate_images (line 120) | def generate_images(self, dlatents=None): FILE: stylegan2-tpu/encoder/perceptual_model.py function load_images (line 12) | def load_images(images_list, image_size=256): function tf_custom_l1_loss (line 22) | def tf_custom_l1_loss(img1,img2): function tf_custom_logcosh_loss (line 25) | def tf_custom_logcosh_loss(img1,img2): function unpack_bz2 (line 28) | def unpack_bz2(src_path): class PerceptualModel (line 35) | class PerceptualModel: method __init__ (line 36) | def __init__(self, args, batch_size=1, perc_model=None, sess=None, opt... method compare_images (line 85) | def compare_images(self,img1,img2): method add_placeholder (line 90) | def add_placeholder(self, var_name): method assign_placeholder (line 95) | def assign_placeholder(self, var_name, var_val): method build_perceptual_model (line 98) | def build_perceptual_model(self, generator): method generate_face_mask (line 158) | def generate_face_mask(self, im): method load_images (line 187) | def load_images(self, images_list): method set_reference_images (line 192) | def set_reference_images(self, images_list): method set_reference_image_data (line 195) | def set_reference_image_data(self, loaded_image, images_list=None): method optimize (line 258) | def optimize(self, iterations=200): FILE: stylegan2-tpu/generate_images_tpu.py function rand_latent (line 24) | def rand_latent(n, seed=None): function tfinit (line 35) | def tfinit(): function load_checkpoint (line 39) | def load_checkpoint(path, checkpoint_num=None): function get_checkpoint (line 50) | def get_checkpoint(path): function get_grid_size (line 55) | def get_grid_size(n): function gen_images (line 68) | def gen_images(latents, truncation_psi_val, outfile=None, display=False,... function grab (line 92) | def grab(save_dir, i, n=1, latents=None, **kwargs): FILE: stylegan2-tpu/mammos.py function with_session (line 52) | def with_session(sess, f, *args, **kws): function with_session_async (line 56) | async def with_session_async(sess, f, *args, **kws): function init (line 60) | def init(session=None, num_channels=None, resolution=None, label_size=No... function load_checkpoint (line 80) | def load_checkpoint(path, session=None, var_list=None): function get_images (line 98) | def get_images(tags, seed = 0, mu = 0, sigma = 0, truncation=None): FILE: stylegan2-tpu/metrics/frechet_inception_distance.py class FID (line 21) | class FID(metric_base.MetricBase): method __init__ (line 22) | def __init__(self, num_images, minibatch_per_gpu, **kwargs): method _evaluate (line 27) | def _evaluate(self, Gs, Gs_kwargs, num_gpus): FILE: stylegan2-tpu/metrics/inception_score.py class IS (line 19) | class IS(metric_base.MetricBase): method __init__ (line 20) | def __init__(self, num_images, num_splits, minibatch_per_gpu, **kwargs): method _evaluate (line 26) | def _evaluate(self, Gs, Gs_kwargs, num_gpus): FILE: stylegan2-tpu/metrics/linear_separability.py function prob_normalize (line 66) | def prob_normalize(p): function mutual_information (line 71) | def mutual_information(p): function entropy (line 85) | def entropy(p): function conditional_entropy (line 95) | def conditional_entropy(p): class LS (line 104) | class LS(metric_base.MetricBase): method __init__ (line 105) | def __init__(self, num_samples, num_keep, attrib_indices, minibatch_pe... method _evaluate (line 113) | def _evaluate(self, Gs, Gs_kwargs, num_gpus): FILE: stylegan2-tpu/metrics/metric_base.py class MetricBase (line 23) | class MetricBase: method __init__ (line 24) | def __init__(self, name): method close (line 34) | def close(self): method _reset (line 37) | def _reset(self, network_pkl=None, run_dir=None, data_dir=None, datase... method configure_progress_reports (line 55) | def configure_progress_reports(self, plo, phi, pmax, psec=15): method run (line 61) | def run(self, network_pkl, run_dir=None, data_dir=None, dataset_args=N... method get_result_str (line 79) | def get_result_str(self): method update_autosummaries (line 90) | def update_autosummaries(self): method _evaluate (line 94) | def _evaluate(self, Gs, Gs_kwargs, num_gpus): method _report_result (line 97) | def _report_result(self, value, suffix='', fmt='%-10.4f'): method _report_progress (line 100) | def _report_progress(self, pcur, pmax, status_str=''): method _get_cache_file_for_reals (line 110) | def _get_cache_file_for_reals(self, extension='pkl', **kwargs): method _get_dataset_obj (line 119) | def _get_dataset_obj(self): method _iterate_reals (line 124) | def _iterate_reals(self, minibatch_size): method _iterate_fakes (line 132) | def _iterate_fakes(self, Gs, minibatch_size, num_gpus): method _get_random_labels_tf (line 139) | def _get_random_labels_tf(self, minibatch_size): class MetricGroup (line 145) | class MetricGroup: method __init__ (line 146) | def __init__(self, metric_kwarg_list): method run (line 149) | def run(self, *args, **kwargs): method get_result_str (line 153) | def get_result_str(self): method update_autosummaries (line 156) | def update_autosummaries(self): class DummyMetric (line 163) | class DummyMetric(MetricBase): method _evaluate (line 164) | def _evaluate(self, Gs, Gs_kwargs, num_gpus): FILE: stylegan2-tpu/metrics/perceptual_path_length.py function normalize (line 20) | def normalize(v): function slerp (line 24) | def slerp(a, b, t): class PPL (line 35) | class PPL(metric_base.MetricBase): method __init__ (line 36) | def __init__(self, num_samples, epsilon, space, sampling, crop, miniba... method _evaluate (line 48) | def _evaluate(self, Gs, Gs_kwargs, num_gpus): FILE: stylegan2-tpu/metrics/precision_recall.py function batch_pairwise_distances (line 21) | def batch_pairwise_distances(U, V): class DistanceBlock (line 39) | class DistanceBlock(): method __init__ (line 41) | def __init__(self, num_features, num_gpus): method pairwise_distances (line 56) | def pairwise_distances(self, U, V): class ManifoldEstimator (line 62) | class ManifoldEstimator(): method __init__ (line 64) | def __init__(self, distance_block, features, row_batch_size, col_batch... method evaluate (line 97) | def evaluate(self, eval_features, return_realism=False, return_neighbo... function knn_precision_recall_features (line 139) | def knn_precision_recall_features(ref_features, eval_features, feature_n... class PR (line 172) | class PR(metric_base.MetricBase): method __init__ (line 173) | def __init__(self, num_images, nhood_size, minibatch_per_gpu, row_batc... method _evaluate (line 181) | def _evaluate(self, Gs, Gs_kwargs, num_gpus): FILE: stylegan2-tpu/prepare_image.py class Namespace (line 23) | class Namespace(): function _int64_feature (line 28) | def _int64_feature(value): function _bytes_feature (line 35) | def _bytes_feature(value): function _convert_to_example (line 40) | def _convert_to_example(filename, image_buffer, label_int, label_str, he... class ImageCoder (line 75) | class ImageCoder(object): method __init__ (line 78) | def __init__(self, session=None): method __del__ (line 97) | def __del__(self): method png_to_jpeg (line 100) | def png_to_jpeg(self, image_data): method cmyk_to_rgb (line 104) | def cmyk_to_rgb(self, image_data): method decode_jpeg (line 108) | def decode_jpeg(self, image_data): function parse_tfrecord_tf (line 117) | def parse_tfrecord_tf(record): function parse_tfrecord_file (line 122) | def parse_tfrecord_file(tfr_file, num_threads=8): function init_dataset (line 127) | def init_dataset(dset): function iterate_stylegan_records (line 134) | def iterate_stylegan_records(tfr_file, session=None): function _is_png (line 148) | def _is_png(filename): function _is_png_data (line 151) | def _is_png_data(image_data): function _is_cmyk (line 154) | def _is_cmyk(filename): function get_coder (line 157) | def get_coder(coder=None): function getfile (line 163) | def getfile(path): function _process_image (line 173) | def _process_image(filename, coder=None): function tf_randi (line 205) | def tf_randi(*args, **kws): function tf_rand (line 213) | def tf_rand(*args, **kws): function tf_biased_rand (line 222) | def tf_biased_rand(*args, bias=1, **kws): function tf_between (line 232) | def tf_between(*args, bias=1, **kws): function random_crop (line 238) | def random_crop(image_bytes, scope=None, resize=None, method=tf.image.Re... function distorted_bounding_box_crop (line 264) | def distorted_bounding_box_crop(image_bytes, function _at_least_x_are_equal (line 314) | def _at_least_x_are_equal(a, b, x): function _decode_and_random_crop (line 320) | def _decode_and_random_crop(image_bytes, image_size, resize=True, method... function _decode_and_center_crop (line 345) | def _decode_and_center_crop(image_bytes, image_size, resize=True, method... function get_target (line 366) | def get_target(target=None): function main (line 377) | def main(): function convert_to_example (line 400) | def convert_to_example(csvline, categories): function main2 (line 419) | def main2(): FILE: stylegan2-tpu/pretrained_networks.py function get_path_or_url (line 57) | def get_path_or_url(path_or_gdrive_path): function load_networks (line 64) | def load_networks(path_or_gdrive_path): FILE: stylegan2-tpu/projector.py class Projector (line 16) | class Projector: method __init__ (line 17) | def __init__(self): method _info (line 50) | def _info(self, *args): method set_network (line 54) | def set_network(self, Gs, minibatch_size=1): method run (line 134) | def run(self, target_images): method start (line 147) | def start(self, target_images): method step (line 167) | def step(self): method get_cur_step (line 194) | def get_cur_step(self): method get_dlatents (line 197) | def get_dlatents(self): method get_noises (line 200) | def get_noises(self): method get_images (line 203) | def get_images(self): FILE: stylegan2-tpu/random_crops.py function random_crop (line 13) | def random_crop(image, target, samples, file): FILE: stylegan2-tpu/run_generator.py function generate_images (line 19) | def generate_images(network_pkl, seeds, truncation_psi): function style_mixing_example (line 40) | def style_mixing_example(network_pkl, row_seeds, col_seeds, truncation_p... function _parse_num_range (line 90) | def _parse_num_range(s): function main (line 119) | def main(): FILE: stylegan2-tpu/run_metrics.py function run (line 20) | def run(network_pkl, metrics, dataset, data_dir, mirror_augment): function _str_to_bool (line 31) | def _str_to_bool(v): function main (line 52) | def main(): FILE: stylegan2-tpu/run_projector.py function project_image (line 21) | def project_image(proj, targets, png_prefix, num_snapshots): function project_generated_images (line 34) | def project_generated_images(network_pkl, seeds, num_snapshots, truncati... function project_real_images (line 55) | def project_real_images(network_pkl, dataset_name, data_dir, num_images,... function _parse_num_range (line 73) | def _parse_num_range(s): function main (line 97) | def main(): FILE: stylegan2-tpu/run_training.py function run (line 38) | def run(dataset, data_dir, result_dir, config_id, num_gpus, total_kimg, ... function _str_to_bool (line 144) | def _str_to_bool(v): function _parse_comma_sep (line 154) | def _parse_comma_sep(s): function main (line 176) | def main(): FILE: stylegan2-tpu/tflex.py class _DefaultState (line 21) | class _DefaultState(threading.local): method __init__ (line 22) | def __init__(self, **kws): method save (line 27) | def save(self): method restore (line 30) | def restore(self, state): function with_defaults (line 37) | def with_defaults(thunk): function get_default (line 55) | def get_default(name, required=True): function set_default (line 62) | def set_default(name, value): function ensure_default (line 66) | def ensure_default(name, value): function get_default_session (line 73) | def get_default_session(required=False): function get_default_graph (line 76) | def get_default_graph(required=False): class Future (line 79) | class Future(object): method __init__ (line 80) | def __init__(self, dependencies, thunk, *args, **kws): method run (line 94) | def run(self): method run_async (line 101) | def run_async(self): method join (line 108) | def join(self): function defer (line 115) | def defer(thunk, *args, **kws): function parallelize (line 123) | def parallelize(xs, thunk, *args, daemon=True): function parallelize_verbose (line 131) | def parallelize_verbose(label, xs, thunk, *args, daemon=True): function parallelize_verbose (line 142) | def parallelize_verbose(label, xs, thunk, *args, daemon=True, synchronou... function group (line 162) | def group(n, iterable, fillvalue=None): function tuples (line 167) | def tuples(*args, **kws): class Namespace (line 170) | class Namespace(object): function reroute (line 188) | def reroute(addr, host=None): class TPUClusterResolver (line 208) | class TPUClusterResolver(BaseTPUClusterResolver): method __init__ (line 209) | def __init__(self, *args, host=None, **kws): method master (line 216) | def master(self, *args, **kws): method cluster_spec (line 220) | def cluster_spec(self): function init_tpu (line 227) | def init_tpu(name, host=None, timeout_in_ms=600 * 60 * 1000): function get_session (line 242) | def get_session(session=None): function get_devices (line 247) | def get_devices(session=None): function has_gpu (line 255) | def has_gpu(session=None): function has_tpu (line 264) | def has_tpu(session=None): function get_cores_from_devices (line 273) | def get_cores_from_devices(devices): function get_cores (line 281) | def get_cores(session=None, devices=None): function get_cpus (line 286) | def get_cpus(session=None, devices=None): function get_tpu_resolver (line 292) | def get_tpu_resolver(tpu_name='auto'): function pretty (line 301) | def pretty(x, ellipsize=120): function print_backtrace (line 307) | def print_backtrace(): class Session (line 314) | class Session(tf.Session): method __init__ (line 315) | def __init__(self, target='auto', graph=None, config=None, init_tpu=Fa... method _spec (line 342) | def _spec(self): method ensure (line 345) | def ensure(self): method run (line 352) | def run(self, *args, **kws): function split_by_params (line 371) | def split_by_params(vs, n=20e6, f=None): function latest_checkpoint (line 386) | def latest_checkpoint(checkpoint_dir, latest_filename=None): function truncate_value (line 395) | def truncate_value(variable, value, reshape=True): function initialize_tpu (line 412) | def initialize_tpu(session=None, timeout_in_ms=None): function load (line 421) | def load(variable, value, session=None, timeout_in_ms=None): function eval (line 432) | def eval(variable, session=None, timeout_in_ms=None): function grab_values (line 439) | def grab_values(variables, reader, reshape=False): function assign_values (line 446) | def assign_values(variables, values, session=None, timeout_in_ms=60000): function load_snapshot (line 459) | def load_snapshot(ckpt, session=None, var_list=None, reshape=False): function get_variable (line 467) | def get_variable(name, var_list=None): function load_weights (line 476) | def load_weights(ckpt, session=None, var_list=None, reshape=False): function load_variables (line 489) | def load_variables(ckpt, session=None, var_list=None, reshape=False): function maketree (line 497) | def maketree(path): function cast_variables (line 505) | def cast_variables(variables, graph=None, cache_ops=None): function variable_name (line 527) | def variable_name(variable): function save_variables (line 532) | def save_variables(ckpt, session=None, var_list=None): function fetch_variables (line 550) | def fetch_variables(session=None, var_list=None): function partition_variables (line 557) | def partition_variables(session=None, var_list=None): class Saver (line 563) | class Saver(object): method __init__ (line 564) | def __init__( method restore (line 598) | def restore(self, sess, save_path): method save (line 610) | def save(self, method fetch (line 638) | def fetch(self, sess, var_list=None): method variables (line 644) | def variables(self, sess, var_list=None): method assign (line 650) | def assign(self, sess, variables, values): class Commands (line 653) | class Commands(object): method __init__ (line 654) | def __init__(self, path='commands'): method has (line 661) | def has(self, name, **keys): method add (line 673) | def add(self, name, action=None): method full_path (line 679) | def full_path(self, name): method check (line 682) | def check(self, *args, **keys): method run (line 697) | def run(self, op): method run_with_args (line 711) | def run_with_args(self, op, *args, **keys): function commands (line 717) | def commands(**keys): class CommandArgs (line 736) | class CommandArgs(object): method __init__ (line 737) | def __init__(self, *args, **keys): method __enter__ (line 742) | def __enter__(self): method __exit__ (line 748) | def __exit__(self, *excinfo): function check_commands (line 752) | def check_commands(): function check_commands_with_args (line 759) | def check_commands_with_args(*args, **keys): function add_command (line 767) | def add_command(name, action=None, **keys): function register_command (line 771) | def register_command(*args, **keys): function has_command (line 786) | def has_command(name): function run_command (line 790) | def run_command(command_name): function run_command_with_args (line 794) | def run_command_with_args(command_name, *args, **keys): function command_arg (line 798) | def command_arg(x, unset=None): function command_args (line 810) | def command_args(): function attach_debugger (line 815) | def attach_debugger(): function print_status (line 822) | def print_status(): function utc (line 833) | def utc(): function heartbeat (line 839) | def heartbeat(): function freeze_forever (line 852) | def freeze_forever(): function quit (line 875) | def quit(): function should_quit (line 884) | def should_quit(): function save_and_quit (line 888) | def save_and_quit(): function throw_exception (line 896) | def throw_exception(): function nullcontext (line 904) | def nullcontext(enter_result=None): function set_override_device (line 907) | def set_override_device(value, session=None): function has_override_device (line 912) | def has_override_device(session=None): function get_override_device (line 916) | def get_override_device(session=None): function set_override_cores (line 921) | def set_override_cores(value, session=None): function has_override_cores (line 926) | def has_override_cores(session=None): function get_override_cores (line 930) | def get_override_cores(session=None): function device_for_tpu_core (line 935) | def device_for_tpu_core(task=0, core=0, job_name="tpu_worker"): function device (line 938) | def device(name=''): function tuples (line 963) | def tuples(l, n=2): function sha256hex (line 971) | def sha256hex(x): function sha256label (line 976) | def sha256label(x): FILE: stylegan2-tpu/tflex_test.py function make_future (line 5) | def make_future(label, delay=0.0, deps=[], thunk=None, args=[]): function warmup (line 18) | def warmup(): function test1 (line 21) | def test1(): function test2 (line 27) | def test2(): function test3 (line 33) | def test3(): function test4 (line 37) | def test4(): function test5 (line 44) | def test5(): function run_test (line 54) | def run_test(name, thunk, *args, **kws): function run_tests (line 63) | def run_tests(): FILE: stylegan2-tpu/training/dataset.py class TFRecordDataset (line 23) | class TFRecordDataset: method __init__ (line 24) | def __init__(self, method close (line 149) | def close(self): method configure (line 153) | def configure(self, minibatch_size, lod=0): method get_minibatch_tf (line 163) | def get_minibatch_tf(self): # => images, labels method get_minibatch_np (line 167) | def get_minibatch_np(self, minibatch_size, lod=0): # => images, labels method get_random_labels_tf (line 180) | def get_random_labels_tf(self, minibatch_size): # => labels method get_random_labels_np (line 188) | def get_random_labels_np(self, minibatch_size): # => labels method parse_tfrecord_tf (line 195) | def parse_tfrecord_tf(record): method parse_tfrecord_tf_float (line 204) | def parse_tfrecord_tf_float(record): method parse_tfrecord_np (line 210) | def parse_tfrecord_np(record): function load_dataset (line 220) | def load_dataset(class_name=None, data_dir=None, verbose=False, **kwargs): FILE: stylegan2-tpu/training/imagenet_input.py class Namespace (line 21) | class Namespace: function distorted_bounding_box_crop (line 28) | def distorted_bounding_box_crop(image_bytes, function _at_least_x_are_equal (line 88) | def _at_least_x_are_equal(a, b, x): function _decode_and_random_crop (line 95) | def _decode_and_random_crop(image_bytes, image_size): function _decode_and_center_crop_image (line 109) | def _decode_and_center_crop_image(image_bytes, image_size, crop_padding=... function _decode_and_center_crop (line 133) | def _decode_and_center_crop(image_bytes, image_size, crop_padding=None): function _flip (line 145) | def _flip(image): function preprocess_for_train (line 151) | def preprocess_for_train(image_bytes, use_bfloat16, image_size): function preprocess_for_eval (line 170) | def preprocess_for_eval(image_bytes, use_bfloat16, image_size): function preprocess_image (line 188) | def preprocess_image(image_bytes, function image_serving_input_fn (line 238) | def image_serving_input_fn(): function _int64_feature (line 257) | def _int64_feature(value): function _bytes_feature (line 264) | def _bytes_feature(value): function _convert_to_example (line 269) | def _convert_to_example(image_buffer, label): class ImageNetTFExampleInput (line 289) | class ImageNetTFExampleInput(object): method __init__ (line 300) | def __init__(self, method set_shapes (line 315) | def set_shapes(self, batch_size, images, labels): method dataset_parser (line 334) | def dataset_parser(self, value): method dataset_parser_static (line 374) | def dataset_parser_static(self, value): method dataset_parser_dynamic (line 407) | def dataset_parser_dynamic(self, image_bytes, label): method pad_dataset (line 414) | def pad_dataset(self, dataset, num_hosts): method make_source_dataset (line 430) | def make_source_dataset(self, index, num_hosts): method input_fn (line 447) | def input_fn(self, params): class ImageNetInput (line 533) | class ImageNetInput(ImageNetTFExampleInput): method __init__ (line 550) | def __init__(self, method _get_null_input (line 589) | def _get_null_input(self, data): method dataset_parser (line 603) | def dataset_parser(self, value): method make_source_dataset (line 609) | def make_source_dataset(self, index, num_hosts): class ImageNetBigtableInput (line 674) | class ImageNetBigtableInput(ImageNetTFExampleInput): method __init__ (line 678) | def __init__(self, is_training, use_bfloat16, transpose_input, selecti... method make_source_dataset (line 693) | def make_source_dataset(self, index, num_hosts): FILE: stylegan2-tpu/training/loss.py function G_logistic (line 18) | def G_logistic(G, D, opt, training_set, minibatch_size): function G_logistic_ns (line 28) | def G_logistic_ns(G, D, opt, training_set, minibatch_size): function D_logistic (line 38) | def D_logistic(G, D, opt, training_set, minibatch_size, reals, labels): function D_logistic_r1 (line 57) | def D_logistic_r1(G, D, opt, training_set, minibatch_size, reals, labels... function D_logistic_r2 (line 78) | def D_logistic_r2(G, D, opt, training_set, minibatch_size, reals, labels... function G_wgan (line 103) | def G_wgan(G, D, opt, training_set, minibatch_size): function D_wgan (line 113) | def D_wgan(G, D, opt, training_set, minibatch_size, reals, labels, wgan_... function D_wgan_gp (line 135) | def D_wgan_gp(G, D, opt, training_set, minibatch_size, reals, labels, wg... function G_logistic_ns_pathreg (line 170) | def G_logistic_ns_pathreg(G, D, opt, training_set, minibatch_size, pl_mi... FILE: stylegan2-tpu/training/misc.py function open_file_or_url (line 20) | def open_file_or_url(file_or_url): function load_pkl (line 25) | def load_pkl(file_or_url, filename=None): function save_pkl (line 30) | def save_pkl(obj, filename): function adjust_dynamic_range (line 37) | def adjust_dynamic_range(data, drange_in, drange_out): function create_image_grid (line 44) | def create_image_grid(images, grid_size=None): function convert_to_pil_image (line 61) | def convert_to_pil_image(image, drange=[0,1]): function save_image_grid (line 74) | def save_image_grid(images, filename, drange=[0,1], grid_size=None): function apply_mirror_augment (line 77) | def apply_mirror_augment(minibatch): function parse_config_for_previous_run (line 86) | def parse_config_for_previous_run(run_dir): function setup_snapshot_image_grid (line 96) | def setup_snapshot_image_grid(training_set, FILE: stylegan2-tpu/training/networks_stylegan.py function _i (line 17) | def _i(x): return tf.transpose(x, [0,2,3,1]) function _o (line 18) | def _o(x): return tf.transpose(x, [0,3,1,2]) function _blur2d (line 24) | def _blur2d(x, f=[1,2,1], normalize=True, flip=False, stride=1): function _upscale2d (line 53) | def _upscale2d(x, factor=2, gain=1): function _downscale2d (line 72) | def _downscale2d(x, factor=2, gain=1): function blur2d (line 98) | def blur2d(x, f=[1,2,1], normalize=True): function upscale2d (line 110) | def upscale2d(x, factor=2): function downscale2d (line 122) | def downscale2d(x, factor=2): function get_weight (line 137) | def get_weight(shape, gain=np.sqrt(2), use_wscale=False, lrmul=1): function dense (line 156) | def dense(x, fmaps, **kwargs): function conv2d (line 166) | def conv2d(x, fmaps, kernel, **kwargs): function upscale2d_conv2d (line 176) | def upscale2d_conv2d(x, fmaps, kernel, fused_scale='auto', **kwargs): function conv2d_downscale2d (line 195) | def conv2d_downscale2d(x, fmaps, kernel, fused_scale='auto', **kwargs): function apply_bias (line 215) | def apply_bias(x, lrmul=1): function leaky_relu (line 225) | def leaky_relu(x, alpha=0.2): function pixel_norm (line 241) | def pixel_norm(x, epsilon=1e-8): function instance_norm (line 249) | def instance_norm(x, epsilon=1e-8): function style_mod (line 263) | def style_mod(x, dlatent, **kwargs): function apply_noise (line 272) | def apply_noise(x, noise_var=None, randomize_noise=True): function minibatch_stddev_layer (line 285) | def minibatch_stddev_layer(x, group_size=4, num_new_features=1): function G_style (line 304) | def G_style( function G_mapping (line 386) | def G_mapping( function G_synthesis (line 442) | def G_synthesis( function D_basic (line 566) | def D_basic( FILE: stylegan2-tpu/training/networks_stylegan2.py function _i (line 22) | def _i(x): return tf.transpose(x, [0,2,3,1]) function _o (line 23) | def _o(x): return tf.transpose(x, [0,3,1,2]) function get_weight (line 28) | def get_weight(shape, gain=1, use_wscale=True, lrmul=1, weight_var='weig... function dense_layer (line 47) | def dense_layer(x, fmaps, gain=1, use_wscale=True, lrmul=1, weight_var='... function conv2d_layer (line 57) | def conv2d_layer(x, fmaps, kernel, up=False, down=False, resample_kernel... function apply_bias_act (line 72) | def apply_bias_act(x, act='linear', alpha=None, gain=None, lrmul=1, bias... function naive_upsample_2d (line 79) | def naive_upsample_2d(x, factor=2): function naive_downsample_2d (line 86) | def naive_downsample_2d(x, factor=2): function modulated_conv2d_layer (line 95) | def modulated_conv2d_layer(x, y, fmaps, kernel, up=False, down=False, de... function minibatch_stddev_layer (line 138) | def minibatch_stddev_layer(x, group_size=4, num_new_features=1): function G_main (line 157) | def G_main( function G_mapping (line 257) | def G_mapping( function G_synthesis_stylegan_revised (line 313) | def G_synthesis_stylegan_revised( function G_synthesis_stylegan2 (line 425) | def G_synthesis_stylegan2( function D_stylegan (line 525) | def D_stylegan( function D_stylegan2 (line 625) | def D_stylegan2( function weight_initializer (line 720) | def weight_initializer(initializer=NORMAL_INIT, stddev=0.02): function spectral_norm (line 739) | def spectral_norm(inputs, epsilon=1e-12, singular_value="left", return_n... function graph_name (line 820) | def graph_name(name): function graph_spectral_norm (line 831) | def graph_spectral_norm(w): function graph_images (line 846) | def graph_images(images, res): function conv2d (line 855) | def conv2d(inputs, output_dim, k_h, k_w, d_h, d_w, stddev=0.02, name="co... function non_local_block (line 874) | def non_local_block(x, name, use_sn): FILE: stylegan2-tpu/training/train_runner.py function device_for_tpu_core (line 41) | def device_for_tpu_core(task=0, core=0): function wrap_computation_in_while_loop (line 47) | def wrap_computation_in_while_loop(op_fn, n, parallel_iterations=1): function tpu_ordinal_fn (line 63) | def tpu_ordinal_fn(shard_index_in_host): class TrainRunner (line 77) | class TrainRunner(object): method __init__ (line 80) | def __init__(self, iterations, train_steps): method device_for_host (line 114) | def device_for_host(self, task=0, cpu=0): method build_enqueue_ops (line 118) | def build_enqueue_ops(self, input_fn, params, host_id): method initialize (line 170) | def initialize(self, input_fn, model_fn, params): method train (line 264) | def train(self, num_threads=2): method shutdown (line 313) | def shutdown(self): FILE: stylegan2-tpu/training/training_loop.py function process_reals (line 27) | def process_reals(x, labels, lod, mirror_augment, drange_data, drange_net): function training_schedule (line 54) | def training_schedule( function get_input_fn (line 109) | def get_input_fn(training_set, batch_size): function get_input_fn (line 121) | def get_input_fn(training_set): function set_shapes (line 133) | def set_shapes(batch_size, num_channels, resolution, label_size, images,... function tf_randi (line 157) | def tf_randi(*args, **kws): function tf_rand (line 166) | def tf_rand(*args, **kws): function tf_biased_rand (line 176) | def tf_biased_rand(*args, bias=1, **kws): function tf_between (line 187) | def tf_between(*args, bias=1, **kws): function random_crop (line 194) | def random_crop(image_bytes, scope=None, resize=None, method=tf.image.Re... function _decode_and_center_crop (line 215) | def _decode_and_center_crop(image_bytes, image_size, crop_padding=0): function parse_header (line 262) | def parse_header(x): function csv_dataset (line 268) | def csv_dataset(path, spec=None, **kws): function imagenet_dataset (line 274) | def imagenet_dataset(path, resize=None, seed=None): function get_input_fn (line 293) | def get_input_fn(load_training_set, num_cores, mirror_augment, drange_net): function training_loop (line 489) | def training_loop( FILE: stylegan2-tpu/view.py function rand_latent (line 72) | def rand_latent(n, seed=None): function tfinit (line 88) | def tfinit(): function load_checkpoint (line 95) | def load_checkpoint(path): function get_grid_size (line 113) | def get_grid_size(n): function gen_images (line 125) | def gen_images(latents, outfile=None, display=False, labels=None, random... function grab (line 148) | def grab(name, postfix, i, n=1, latents=None, **kwargs): function grab_grid (line 157) | def grab_grid(i, n=1, latents=None, outfile=None, **kwargs): function post_picture (line 167) | def post_picture(channel_name, image, text=None, name='test', kind='png'):