Skip to content

Instantly share code, notes, and snippets.

View csJd's full-sized avatar
🤗
dd. : i can delete 2 lines

Deng csJd

🤗
dd. : i can delete 2 lines
View GitHub Profile
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+shift+enter",
"command": "python.execInTerminal",
"when": "editorTextFocus && editorLangId == 'python'"
}
]
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)
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
@csJd
csJd / path_util.py
Last active January 23, 2019 10:59
path utility
# 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__), '..'))