This is a Guild AI runs repository. To access runs, install Guild AI and run guild pull gist:dfalbel/denoising
. For more information about Guild AI Gist based repositories, see Guild AI - Gists.
This is a Guild AI runs repository. To access runs, install Guild AI and run guild pull gist:dfalbel/denoising-diffusion-runs
. For more information about Guild AI Gist based repositories, see Guild AI - Gists.
This file contains hidden or 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
library(torch) | |
dat <- dataset( | |
"mydataset", | |
initialize = function(time, size, len = 100 * 32) { | |
self$time <- time | |
self$len <- len | |
self$size <- size | |
}, | |
.getitem = function(i) { |
This file contains hidden or 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
library(keras) | |
library(tensorflow) | |
input <- layer_input(shape = list(365, 10)) | |
representation <- input %>% | |
layer_lstm(units = 32, input_shape = list(365, 10)) %>% | |
layer_dropout(rate = 0.2) | |
output1 <- representation %>% | |
layer_dense(units = 2, name = "out1") |
This file contains hidden or 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
library(torch) | |
library(ggplot2) | |
# we want to find the minimum of this function | |
# using the gradient descent. | |
f <- function(x) { | |
x^2 - x | |
} |
This file contains hidden or 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
todoist_token <- config::get("TODOIST_TOKEN") | |
get_tasks_week <- function(week = 0, offset = 0) { | |
res <- httr::POST( | |
url = "https://api.todoist.com/sync/v8/activity/get", | |
body = list( | |
token = todoist_token, | |
limit = 100, | |
page = week, |
This file contains hidden or 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
--- | |
title: "Quora Question Pairs" | |
output: | |
flexdashboard::flex_dashboard: | |
orientation: columns | |
runtime: shiny | |
--- | |
```{r global, include=FALSE} | |
library(keras) |
This file contains hidden or 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
library(readr) | |
library(keras) | |
library(purrr) | |
FLAGS <- flags( | |
flag_integer("vocab_size", 50000), | |
flag_integer("max_len_padding", 20), | |
flag_integer("embedding_size", 256), | |
flag_numeric("regularization", 0.0001), | |
flag_integer("seq_embedding_size", 512) |
This file contains hidden or 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
download.file("https://snap.stanford.edu/data/finefoods.txt.gz", "finefoods.txt.gz") | |
library(readr) | |
library(stringr) | |
library(purrr) | |
reviews <- read_lines("finefoods.txt.gz") | |
reviews <- reviews[str_sub(reviews, 1, 12) == "review/text:"] | |
reviews <- str_sub(reviews, start = 14) |
NewerOlder