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
| class ConvStack1d(nn.Module): | |
| def __init__(self, input_features, output_features): | |
| super().__init__() | |
| cqt_feats=217 | |
| op_divby=2 | |
| l1_out_channels= cqt_feats //op_divby | |
| self.cnn = nn.Sequential( | |
| # layer 0 | |
| nn.Conv1d(output_features, l1_out_channels, 3 , padding=1), | |
| nn.BatchNorm1d(l1_out_channels), |
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
| Run | F1 | Recall | |
|---|---|---|---|
| using 2d convolution | 0.827038 | 0.774268 | |
| using 1d convolution along the frequency axis | 0.606367 | 0.575986 | |
| using 1d convolution along the time axis | 0.969859 | 0.966472 |
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
| class ConvStack2d(nn.Module): | |
| def __init__(self, input_features, output_features): | |
| super().__init__() | |
| # input is batch_size * 1 channel * frames * input_features | |
| self.cnn = nn.Sequential( | |
| # layer 0 | |
| nn.Conv2d(1, output_features // 16, (3, 3), padding=1), | |
| nn.BatchNorm2d(output_features // 16), | |
| nn.ReLU(), |
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
| dir /soundfont | |
| bank 0 | |
| 74 %font ExpressiveFluteSSO-v1.2.sf2 0 0 | |
| 40 %font Strings-4U-v1.0.sf2 0 0 | |
| 54 %font KBH-Real-Choir-V2.5.sf2 0 1 |
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
| <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" | |
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 | |
| http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
| <activeProfiles> | |
| <activeProfile>github</activeProfile> | |
| </activeProfiles> | |
| <profiles> |
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
| (defproject group-id/artifact-id "version" | |
| :repositories [["github" {:url "https://maven.pkg.github.com/<githubusername>/<repo>" | |
| :username <github-username> :password [:env/GITHUB_TOKEN]}]] | |
| ;;other bits | |
| ) |
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
| name: Publish package to GitHub Packages | |
| on: [push] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v2 |
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
| (ns clj-k8s-job.core | |
| (:require | |
| [clojure-kubernetes-client.core :as core] | |
| [clojure-kubernetes-client.api.core-v1 :refer [read-namespaced-pod-log | |
| list-pod-for-all-namespaces]] | |
| [clojure-kubernetes-client.api.batch-v1 :refer [create-namespaced-job | |
| read-namespaced-job-status | |
| delete-namespaced-job]])) | |
| (def pi-job-spec |
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
| (delete-namespaced-job "pi" "default" | |
| {:kind :DeleteOptions | |
| :propagationPolicy "Foreground"}) | |
| ;;all dependents are deleted when this command returns |
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
| (-> | |
| ;;this is a utility API to get the name of the pods | |
| ;;used by the job named pi. | |
| (get-job-pods "pi") | |
| first | |
| (read-namespaced-pod-log "default")) | |
| ;;the result is the first 50 digits of pi. | |
| ;;"3.1415926535897932384626433832795028841971693993751\n" |
NewerOlder