Created
March 29, 2019 22:55
-
-
Save yearofthewhopper/27b3208e9a91827198ee9ef901adb704 to your computer and use it in GitHub Desktop.
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
from tensorflow.python.client import device_lib | |
device_lib.list_local_devices() | |
!cat /proc/meminfo | |
!cat /proc/cpuinfo | |
add question mark (?) see functions | |
# Which file to send? | |
file_name = "something.tar" | |
from googleapiclient.http import MediaFileUpload | |
from googleapiclient.discovery import build | |
auth.authenticate_user() | |
drive_service = build('drive', 'v3') | |
def save_file_to_drive(name, path): | |
file_metadata = {'name': name, 'mimeType': 'application/octet-stream'} | |
media = MediaFileUpload(path, mimetype='application/octet-stream', resumable=True) | |
created = drive_service.files().create(body=file_metadata, media_body=media, fields='id').execute() | |
return created | |
save_file_to_drive(file_name, file_name) | |
#tensorboard | |
# You can change the directory name | |
LOG_DIR = 'tb_logs' | |
!wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
!unzip ngrok-stable-linux-amd64.zip | |
import os | |
if not os.path.exists(LOG_DIR): | |
os.makedirs(LOG_DIR) | |
get_ipython().system_raw( | |
'tensorboard --logdir {} --host 0.0.0.0 --port 6006 &' | |
.format(LOG_DIR)) | |
get_ipython().system_raw('./ngrok http 6006 &') | |
!curl -s http://localhost:4040/api/tunnels | python3 -c \ | |
"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])" | |
CoreML 2.0 | |
# Supported models for swift 2.0 (CoreML 2.0) | |
# Supported frameworks | |
# Neural networks | |
# Feedforward, convolutional, recurrent | |
# Caffe v1 | |
# Keras 1.2.2+ | |
# Tree ensembles | |
# Random forests, boosted trees, decision trees | |
# scikit-learn 0.18 | |
# XGBoost 0.6 | |
# Support vector machines | |
# Scalar regression, multiclass classification | |
# scikit-learn 0.18 | |
# LIBSVM 3.22 | |
# Generalized linear models | |
# Linear regression, logistic regression | |
# scikit-learn 0.18 | |
# Feature engineering | |
# Sparse vectorization, dense vectorization, categorical processing | |
# scikit-learn 0.18 | |
# Pipeline models | |
# Sequentially chained models | |
# scikit-learn 0.18 | |
# converting caffe to coreml | |
# setting is_bgr = True for caffe.convert() when generating your mlmodel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://medium.com/deep-learning-turkey/google-colab-free-gpu-tutorial-e113627b9f5d