Skip to content

Instantly share code, notes, and snippets.

View sammlapp's full-sized avatar

Sam Lapp sammlapp

View GitHub Profile

this is markdown!

when we put a link it just works...

we can take notes with lists

  • this list
  • this other list

and secondary headers

  • a
  • b

Installing and setting up Pytorch

Procedure for setting up PyTorch for training and predicting with Inception CNN models. We were previously using Tensorflow + Keras, but are transitioning to PyTorch.

crc has instructions for python environment on cluster. Basically, we set up a new virtual environment on the cluster like this:

module purge 
@sammlapp
sammlapp / curtis_craig_audio_notes.md
Last active February 24, 2020 15:25
Notes from meeting with Curtis Craig on recorder testing 2/21/2020

Meeting with Curtis Craig on 2/21/2020

We chatted about approaches to microphone testing, recording impulse responses, simulating distant sound, and other topics. I need to email Curtis as a follow-up (get in touch with SMAART team, ask about crazy localizing mics, etc)

Localization

People are developing crazy microphones with many nodes for directionality (1000?).

Impulse Response measurement

People traditionally pop a balloon. In a large outdoor space, need a starter pistol to activate the space acoustically. But, since birds are not that loud a baloon is probably fine. Once, Curtis used a yacht cannon in a stadium.

@sammlapp
sammlapp / opensoundscape_git_workflow.md
Last active December 15, 2020 22:21
Notes on git workflow for opensoundscape

Cloning a repository and setting up virtualenv

things formatted like this are terminal commands

0. If you don't have virtualenv and poetry, install them:

Check if you have poetry:

which poetry

If nothing is printed, you don't have it.

@sammlapp
sammlapp / rook_globus.md
Last active April 21, 2020 18:24
setting up globus on Rook to transfer files

Start Globus container on Rook

  • Log in to the Rook gui
  • navigate to Start (Apps) > Docker > Container
  • Switch on container called 'Barrymoo-gcp_client1'
  • Double click on container called 'Barrymoo-gcp_client1'
  • Go to Terminal tab

In that terminal (we'll call this the "Rook GUI terminal")

  • type Return
@sammlapp
sammlapp / bridges.md
Last active January 19, 2021 21:35
Using Bridges 2
@sammlapp
sammlapp / swallow_setup.md
Last active March 6, 2024 00:38
Setting up a Raspberry Pi 4.0 to use as a Swallow

Setting up a Raspberry Pi 4.0 to use as a Swallow

These instructions are a work in progress

Operating system

  • flash SD card with raspberry pi OS using Raspberry PI Imager application
  • can now use the set-up features to:
    • set the host-name (swallow-016, eg)
    • enter wifi credentials for a local wifi network.
    • enable SSH
  • set username ("pi" is good) and password (ask a lab member)
@sammlapp
sammlapp / machine_learning_hot_takes.md
Created December 16, 2021 20:17
Machine Learning: Hot Takes

Multi-target vs Single-Target models

aka Multi-label vs Single-label

img

Multi-target = "checkboxes": each option (class) can be chosen or not, independently of the others Single-target model = "radio buttons": choose one and only one of the options (classes)

set up raspberry pi

use Raspberry Pi imager on mac to install Raspberry Pi OS on a microSD card

  • use the advanced setup option to pre-configure ssh access and wifi

remote access to the GUI:

From mac terminal:

  • ssh into pi (ssh pi@username.local, then enter password)
  • install tightvnc: sudo apt update (this might take a while) then sudo apt install tightvncserver
  • start the VNC server (will need to be restarted on each reboot, but you only specify the password the first time): vncserver then enter a password (password has 8 character limit)
@sammlapp
sammlapp / model_sharing_guidelines.md
Last active February 6, 2023 16:57
Sharing models trained in OpenSoundscape

Recommended steps for publicly sharing a model trained with OpenSoundscape

  • Uploading the saved model object to a public location such as Box, OneDrive, etc

    • Save the model object in two different ways to improve usability:

    (1) model.save() in OpenSoundscape to save the entire model object, which can be re-loaded only in the same version as OpenSoundscape

    (2) To enable use with other OpenSoundscape versions, save the weights dictionary and additional model information as a dictionary with torch.save. For instance: