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
// Go to Android Studio -> Help -> Edit Custom Properties | |
// Click "Yes" at the prompt ".../idea.properties does not exist, Create?" | |
// In the idea.properties file, enter | |
studio.projectview=true | |
// Save and restart Android Studio and all projects will be opened in Project View by default |
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
// Find SHA1 of Debug keystore, on Mac located at ~/.android/debug.keystore | |
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v -storepass android |
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
Anaconda consists a list of packages including Conda. | |
Conda is a commanda line package and environment manager. | |
Note the Conda commands below are for Mac: | |
# Help | |
[command ] -- help | |
# Verify conda is installed | |
conda info |
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
// Step 1. Open or create the .bash_file | |
// Open .bash_file | |
$ -a TextEdit ~/.bash_profile | |
// create the file if it doesn’t exist: | |
$ touch ~/.bash_profile | |
// Step 2. Add path to adb tool (note your path maybe different) | |
export PATH=$PATH:/Users/Margaret/Library/Android/sdk/platform-tools/ | |
// Step 3. Make the new path in effect |
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
os.environ['KAGGLE_USERNAME'] = "" # TODO: enter your Kaggle user name here | |
os.environ['KAGGLE_KEY'] = "" # TODO: enter your Kaggle key here |
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
$ kaggle datasets download -d t04glovern/ugatit-selfie2anime-pretrained | |
$ unzip -qq /content/ugatit-selfie2anime-pretrained.zip |
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
with tf.Graph().as_default(), tf.Session() as sess: | |
gan = UGATIT(sess, data) | |
gan.build_model() | |
load_checkpoint(sess, ckpt_path) |
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
def load_checkpoint(sess, ckpt_path): | |
model_saver = tf.train.Saver(tf.global_variables()) | |
checkpoint = os.path.expanduser(checkpoint) | |
if tf.gfile.IsDirectory(checkpoint): | |
checkpoint = tf.train.latest_checkpoint(checkpoint) | |
tf.logging.info('loading latest checkpoint file: {}'.format(checkpoint)) | |
model_saver.restore(sess, checkpoint) |
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
tf.saved_model.simple_save( | |
sess, | |
saved_model_dir, | |
inputs={gan.test_domain_A.name: gan.test_domain_A}, | |
outputs={gan.test_fake_B.name: gan.test_fake_B} | |
) |
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
model = tf.saved_model.load(saved_model_path) | |
concrete_func = model.signatures[ tf.saved_model.DEFAULT_SERVING_SIGNATURE_DEF_KEY] |
OlderNewer