I have always wanted to use Paddle to run multiple cards on a single machine, but I am usually too timid to try it. Today I will play through a few demo s♂ The environment is the four-card environment of aistudio, four V100s, and Fleet is not used at the same time
1. distributed startup
two conditions are required
One is to specify python -m ...

Posted by andco on Sat, 28 Jan 2023 00:28:57 +0300

Perceptron Perceporn
Theory "Statistical Learning Methods" Chapter 2 Perceptron
Code numpy version && torch version
Python3.7
%matplotlib inline
Model
The linear classification model of binary classification aims to find a hyperplane to linearly divide all instances into positive examples and negative examples, a ...

Posted by dbrown on Fri, 27 Jan 2023 14:27:42 +0300

1. What is a function
A function is an organized, reusable piece of code that implements a single or related function. Functions can improve the modularity of the application and the reuse rate of the code. In the previous article, we have used the built-in functions provided by python, such as print(). But you can also create your own functio ...

Posted by zenabi on Tue, 24 Jan 2023 00:31:42 +0300

1. Make a test script First we need to make a script to test if autostart works.
pi@raspberry:~ $ nano /home/pi/start.sh
The content of start.sh is as follows:
/usr/bin/python3 /home/pi/GeometryOperations.py
Be sure to pay attention to the use of absolute paths here, otherwise there is a probability that loading will fail.
Then add t ...

Posted by stunna671 on Sun, 22 Jan 2023 03:58:53 +0300

1. Topics for discussion
slightly.
2. Programming exercises
1. Conduct a random experiment to test the difference between the sequential search algorithm and the binary search algorithm when processing lists of integers.
The binary search algorithm can only search ordered lists, and the sequential search algorithm can search both unorde ...

Posted by trawets on Fri, 20 Jan 2023 16:01:06 +0300

1. Implementation idea of fruit fly optimization algorithm
Fruit Fly Optimization Algorithm (FOA) is a swarm intelligence optimization algorithm proposed by Pan Wenchao in 2011. It simulates the way fruit flies in nature forage, and compares the position information of food to the optimal solution of optimization problems. The optimal soluti ...

Posted by krysco on Fri, 20 Jan 2023 04:38:33 +0300

Install Miniconda
Enter the official website
https://docs.conda.io/en/latest/miniconda.html#macosx-installers
Download the M1 version
The official website download is too slow, go to Tsinghua mirror to download https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/
Note: enter the terminal and enter uname -a to k ...

Posted by SocomNegotiator on Tue, 10 Jan 2023 01:01:28 +0300

1. Comparison operation
For the python language, all objects support comparison operations, which can be used to test equality, relative size, etc. If it is a conforming object (such as: tuple, list), python will check all its parts, including automatically traversing all levels of nested objects until the final result can be ob ...

Posted by dream25 on Mon, 09 Jan 2023 10:39:00 +0300

NumPy provides a multidimensional array object called ndarray whose elements have a fixed size. That is, NumPy array elements are homogeneous and can only store objects of the same data type. It can use vectorized operation to process the entire array, which has high operation efficiency.
array creation
Create an ndarray array through the arr ...

Posted by Elle0000 on Wed, 04 Jan 2023 20:32:18 +0300