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
Pretty print tables summarizing properties of tensor arrays in numpy, pytorch, jax, etc. |
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 os | |
import numpy as np | |
import random | |
import tensorflow as tf | |
# from tfdeterminism import patch - only in older versions (<2?) of Tensorflow | |
# import torch | |
def seed(seed=42): |
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
"""Configuration library for experiments. | |
Based on version by Nuri C. https://gist.github.com/nuric/e9df5e38c34c804ec6c298ffca7e2d9b | |
-- USAGE -- | |
In Header: | |
import config.configlib as configlib | |
from config.configlib import config as C | |
parser = configlib.add_parser("File Spec Config") | |
parser.add_argument("--mlp_size", default=128, type=int, help="Size of Output MLP") |