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
#!/home/msfz751/.pyenv/shims/python3 | |
# #!/usr/bin/env python | |
# change to location of your preferred virtual environment | |
# Source: | |
# https://itectec.com/ubuntu/ubuntu-taking-screenshot-of-a-specific-area-from-the-command-line/ | |
import subprocess | |
import os | |
import sys |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Digits recognition on PNG images. R code | |
1. Added utility functions | |
2. Introspection on dim=2. Extra layers on tensor | |
3. Converting code from Python to R | |
## Objectives | |
1. Read PNG images instead of MNIST standard dataset. | |
2. Save the model | |
3. Read an unseen digit as PNG file using the saved model |
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
# Digits recognition on PNG images. Python code | |
Source: https://www.deeplearningwizard.com/deep_learning/practical_pytorch/pytorch_logistic_regression/ | |
> This is a modified version of the original article. | |
1. added utility functions | |
2. Introspection on dim=2 | |
3. Converting code to R | |
4. Read PNG images instead of MNIST standard dataset |
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
find_rsuite_root <- function(key = "PARAMETERS") rprojroot::find_root(key) | |
source(file.path(find_rsuite_root(), 'R', 'set_env.R'), chdir = TRUE) | |
options(rsuite.cache_path = "~/.rsuite/cache") | |
options(rsuite.user_templ_path = "~/.rsuite/templates") |
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
find_rsuite_root <- function(key = "PARAMETERS") rprojroot::find_root(key) | |
source(file.path(find_rsuite_root(), 'R', 'set_env.R'), chdir = TRUE) | |
.libPaths(c(normalizePath(sbox_path), normalizePath(lib_path), .libPaths())) |
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
# find_rsuite_root <- function(key = "PARAMETERS") rprojroot::find_root(key) | |
ace_rsuite <- find_rsuite_root() | |
lib_path <- file.path(ace_rsuite, "libs") | |
sbox_path <- file.path(ace_rsuite, "sbox") | |
if (!file.exists(lib_path)) { | |
lib_path <- file.path(find_rsuite_root(), "deployment", "libs") | |
sbox_path <- file.path(find_rsuite_root(), "deployment", "sbox") | |
} |
NewerOlder