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
// Place your key bindings in this file to overwrite the defaults | |
[ | |
{ | |
"key": "ctrl+shift+enter", | |
"command": "python.execInTerminal", | |
"when": "editorTextFocus && editorLangId == 'python'" | |
} | |
] |
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 tensorflow as tf | |
import os | |
os.environ["CUDA_VISIBLE_DEVICES"]="0,1" | |
with tf.Session() as sess: | |
a = tf.placeholder(tf.int16, name='a') | |
b = tf.identity(a, name='b') | |
sess.run(b, feed_dict={a: 0}) | |
print(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
import torch | |
from eval import gen_sentence_tensors | |
from dataset import ExhaustiveDataset | |
from utils.path_util import from_project_root | |
def gen_new_records(records): | |
""" | |
Calculate which layer the record is in |
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
# coding: utf-8 | |
# created by deng on 7/23/2018 | |
from os.path import dirname, join, normpath, exists | |
from os import makedirs | |
import time | |
# to get the absolute path of current project | |
project_root_url = normpath(join(dirname(__file__), '..')) |