Skip to content

Instantly share code, notes, and snippets.

View gidim's full-sized avatar

Gideon Mendels gidim

View GitHub Profile
{
"embeddings": [
{
"tensorName": "Word2Vec 10K",
"tensorShape": [10000, 200],
"tensorPath": "https://staging.comet.ml/api/asset/download?experimentKey=fa93606a42a942fe8ed6cafb6dacbdfc&assetId=7c6150fe13ff4682b075e3dfdf6dc33f&isCompressed=false",
"metadataPath": "https://staging.comet.ml/api/asset/download?experimentKey=fa93606a42a942fe8ed6cafb6dacbdfc&assetId=833915c9ad624f9cad2e1a8724778443&isCompressed=false"
}
],
"modelCheckpointPath": "Demo datasets"
@gidim
gidim / comet-listener.py
Last active September 4, 2018 17:12
The following script listens to new lines on a file and reports them to Comet.ml
import json
import logging
import time
from collections import defaultdict
import os
from multiprocessing import Lock
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler, LoggingEventHandler
{"metrics":[{"name":"acc","xSteps":[2,11,17,37,44,50,53,65,71,88,96,98,99,105,107,113,114,120,123,125,142,158,171,186,195,238,249,252,255,280,283,288,291,300,350,354,367,376,383,390,401,409,417,430,431,438,449,462,504,510,521,534,547,558,588,595,635,639,644,687,692,698,702,711,739,741,745,770,775,785,793,798,839,851,884,890,908,922,923,928,936,956,970,986,1011,1012,1015,1022,1025,1026,1029,1031,1037,1044,1073,1081,1084,1089,1100,1108,1112,1114,1136,1142,1171,1175,1182,1187,1190,1195,1227,1235,1240,1242,1247,1257,1264,1283,1285,1290,1295,1334,1339,1344,1346,1353,1366,1371,1385,1426,1437,1446,1473,1493,1499,1500,1500,1533,1535,1541,1556,1568,1598,1607,1620,1638,1654,1664,1708,1735,1750,1751,1780,1784,1787,1790,1793,1805,1826,1850,1868,1879,1886,1890,1896,1923,1927,1946,1966,1985,1986,2003,2025,2032,2033,2034,2036,2067,2071,2086,2088,2092,2094,2104,2129,2134,2147,2166,2220,2230,2241,2254,2257,2260,2283,2293,2309,2310,2322,2344,2354,2356,2365,2369,2395,2404,2408,2411,2415,2442,2463,2474,2478,2480,2482,2485,2502,2
This file has been truncated, but you can view the full file.
{"metrics":[{"name":"acc","xSteps":[2,11,17,37,44,50,53,65,71,88,96,98,99,105,107,113,114,120,123,125,142,158,171,186,195,238,249,252,255,280,283,288,291,300,350,354,367,376,383,390,401,409,417,430,431,438,449,462,504,510,521,534,547,558,588,595,635,639,644,687,692,698,702,711,739,741,745,770,775,785,793,798,839,851,884,890,908,922,923,928,936,956,970,986,1011,1012,1015,1022,1025,1026,1029,1031,1037,1044,1073,1081,1084,1089,1100,1108,1112,1114,1136,1142,1171,1175,1182,1187,1190,1195,1227,1235,1240,1242,1247,1257,1264,1283,1285,1290,1295,1334,1339,1344,1346,1353,1366,1371,1385,1426,1437,1446,1473,1493,1499,1500,1500,1533,1535,1541,1556,1568,1598,1607,1620,1638,1654,1664,1708,1735,1750,1751,1780,1784,1787,1790,1793,1805,1826,1850,1868,1879,1886,1890,1896,1923,1927,1946,1966,1985,1986,2003,2025,2032,2033,2034,2036,2067,2071,2086,2088,2092,2094,2104,2129,2134,2147,2166,2220,2230,2241,2254,2257,2260,2283,2293,2309,2310,2322,2344,2354,2356,2365,2369,2395,2404,2408,2411,2415,2442,2463,2474,2478,2480,2482,2485,2502,2
import requests
access_token = "YOUR KEY HERE"
def get_projects():
url = "https://www.comet.ml/api/rest/v1/projects"
header = {"Authorization": access_token}
res = requests.get(url,headers=header)
print(res.text)
First network (what you want)
computed(c,d) |targets(c,d) |correct?
---------------------------------------------
0.66 0.33 | 1 0 | yes
0.66 0.33 | 1 0 | yes
0.66 0.33 | 0 1 | no
avg cross-entropy loss:
-(ln(0.66) + ln(0.66) + ln(0.3)) / 3 = 0.678335
@gidim
gidim / test_in_batches.py
Created May 16, 2017 13:12
A quick example on how to run in-training validation in batches
'''
A Dynamic Recurrent Neural Network (LSTM) implementation example using
TensorFlow library. This example is using a toy dataset to classify linear
sequences. The generated sequences have variable length.
Long Short Term Memory paper: http://deeplearning.cs.cmu.edu/pdfs/Hochreiter97_lstm.pdf
Author: Aymeric Damien
Project: https://github.com/aymericdamien/TensorFlow-Examples/
'''