JAX transformation and compilation are designed to work only on Python functions that are functionally pure: all the input data is passed through the function parameters, all the results are output through the function results. A pure function will always return the same result if invoked with the same inputs.
Dataset Handling Dataset Class 2 general kinds of Dataset, one that models list (that support __len__) the other models iterator (that support __next__) Data spliting dataset = MNIST(root = './data', train = train, transform = transform, download=True) train_set, val_set = torch.utils.data.random_split(dataset, [50000, 10000]) Data Augmentation and Transform
Classic Music Collection b = corpus.parse('bwv66.6') # read from corpus collection s = converter.parse('bach.mid') # direct read from midi Stream and Score Measure Measure is (小节) excerpt = bachIn.measure(-1) excerptChords = excerpt.chordify() excerptChords.show('text') Measure could be excerpt through .measure or .measures() function
Motivation This note is related to the dynamic visualization note . Sometimes we want to export a movie or animation from matlab or python. Here summarize some common code clips. Matlab GIF Others: MOV AVI MP4 etc Note GIF is less compressed so it’s often huge comparing to other formats.
TOC {:toc} Hacking the Matlab DeepLearning system Why should I choose matlab deeplearning toobox Write our own layers Official Tutorial classdef myLayer < nnet.layer.Layer properties % (Optional) Layer properties. % Layer properties go here. end properties (Learnable) % (Optional) Layer learnable parameters. % Layer learnable parameters go here. end methods function layer = myLayer() % (Optional) Create a myLayer. % This function must have the same name as the class. % Layer constructor function goes here. end function [Z1, …, Zm] = predict(layer, X1, …, Xn) % Forward input data through the layer at prediction time and % output the result. % % Inputs: % layer - Layer to forward propagate through % X1, ..., Xn - Input data % Outputs: % Z1, ..., Zm - Outputs of layer forward function % Layer forward function for prediction goes here. end function [Z1, …, Zm, memory] = forward(layer, X1, …, Xn) % (Optional) Forward input data through the layer at training % time and output the result and a memory value. % % Inputs: % layer - Layer to forward propagate through % X1, ..., Xn - Input data % Outputs: % Z1, ..., Zm - Outputs of layer forward function % memory - Memory value for custom backward propagation % Layer forward function for training goes here. end function [dLdX1, …, dLdXn, dLdW1, …, dLdWk] = ... backward(layer, X1, …, Xn, Z1, …, Zm, dLdZ1, …, dLdZm, memory) % (Optional) Backward propagate the derivative of the loss % function through the layer. % % Inputs: % layer - Layer to backward propagate through % X1, ..., Xn - Input data % Z1, ..., Zm - Outputs of layer forward function % dLdZ1, ..., dLdZm - Gradients propagated from the next layers % memory - Memory value from forward function % Outputs: % dLdX1, ..., dLdXn - Derivatives of the loss with respect to the % inputs % dLdW1, ..., dLdWk - Derivatives of the loss with respect to each % learnable parameter % Layer backward function goes here. end end end Note if the operation has explicit dlarray support you don’t have to write backward for it.
https://www.cnblogs.com/pieces0310/p/4216182.html Decrypting password-based encrypted backup data for Huawei smartphones https://www.sciencedirect.com/science/article/pii/S1742287618304511 http://blog.digital-forensics.it/2019/07/huawei-backup-decryptor.html https://support.redshield.co/hc/en-gb/articles/207523403-Decrypting-Secure-Archives-using-Linux-tar-gz-enc https://www.tecmint.com/encrypt-decrypt-files-tar-openssl-linux/ openssl aes-256-cbc -d -in your_archive_filename.tar.gz.enc -out your_archive_filename.tar.gz tar -zxvf your_archive_filename.tar.gz openssl enc -d -aes256 -in secured.tar.gz | tar xz -C test Key Derivation Function https://emn178.github.io/online-tools/sha256.html
How to use Pen Basically you can use it to draw straight lines and B splines. You get anchor points and handles around that point to control the tangent vector and curvature at that point (curvature can be one sided).
https://www.quora.com/How-can-I-connect-Matlab-to-TensorFlow https://github.com/ajbrock/BigGAN-PyTorch/blob/master/TFHub/converter.py
Using C library in Python https://medium.com/@shamir.stav_83310/making-your-c-library-callable-from-python-by-wrapping-it-with-cython-b09db35012a3 https://www.geeksforgeeks.org/using-c-codes-in-python-set-1/ https://reptate.readthedocs.io/developers/python_c_interface.html Official Cython tutorial http://docs.cython.org/en/latest/src/tutorial/external.html Checking this tutorial for wrapping C++ code up, to be usable in Python. http://docs.cython.org/en/latest/src/userguide/wrapping_CPlusPlus.html https://stackoverflow.com/questions/2105508/wrap-c-lib-with-cython Wrap a dll c++ to cython and python