Python Basics - Super (XXX, self)__ init__ () learning and understanding
On many occasions, especially when writing neural network code, I often see the following code examples:
Definition of neural network under TensorFlow framework:
class BertIntentModel(object):
def __init__(self):
super(BertIntentModel, self).__init__()
self.dict_path = '/Users/vocab.txt'
self.config_path = '/Users/bert_config_rbt3.jso ...
Added by homchz on Tue, 04 Jan 2022 03:44:57 +0200
python tips003 -- collapse of DataLoader_ FN parameter usage details
background
Recently, I was looking at the source code of sensors transformers and found a data loader in a module collate_ FN, I didn't understand what it meant at that time. Later, I checked it and found it very interesting, so let's share it.
dataloader
dataloader must know that it provides an iterator for data.
Basic working mechanism:
...
Added by andygrant on Tue, 04 Jan 2022 03:29:17 +0200
AirSim learning notes 2: Data Mining and preparation
Open source projects: Project address: https://github.com/Microsoft/AutonomousDrivingCookbook Localization project: https://gitee.com/zhoushimin123/autonomous-driving-cookbook
Step 0 - Data Mining and preparation
summary
Our goal is to train a deep learning model, which can predict the steering angle according to the input including the came ...
Added by kristy7 on Mon, 03 Jan 2022 22:51:41 +0200
About register in PyTorch_ forward_ The hook() function failed to execute the problem in which the hook function
About register in PyTorch_ forward_ The hook() function failed to execute the problem in which the hook function
Hook is a very useful feature in PyTorch. Using it, we can easily obtain and change the value and gradient of variables in the middle layer of the network without changing the structure of network input and output. This function is ...
Added by Pobega on Mon, 03 Jan 2022 21:36:54 +0200
Module introduction in pytorch
1. Module class
pytorch can define the instantiation of the model by inheriting the module class, instantiate the internally defined module, and then adjust the servant sub module through forward calculation, so as to complete the construction of the deep learning model.
import torch.nn as nn
class Model(nn.Module):
def __init__(self, .. ...
Added by jaygattis on Mon, 03 Jan 2022 18:40:45 +0200
Learning record -12.27
python os.path() module
Rookie tutorial
os. The path module is mainly used to obtain the attributes of the file.
os.path.isfile(path) determines whether the path is a file os.path.join(path1[, path2[, ...]]) Combine the directory and file name into a path
Save dictionary in python pickle format
Use the dump() function of the pickle mo ...
Added by wizzard81 on Mon, 03 Jan 2022 16:01:28 +0200
Reshape the DataFrame using Pandas melt()
Reshaping DataFrame is an important and essential skill in data science. In this article, we will explore Pandas Melt() and how to use it for data processing.The simplest meltThe simplest melt() does not require any parameters. It turns all columns into rows (displayed as column variables) and lists all associated values in the new column value ...
Added by jeff_papciak on Mon, 03 Jan 2022 15:48:52 +0200
[source code analysis] PyTorch distributed elastic training - start & single node process
[source code analysis] PyTorch distributed elastic training (2) - start & single node process
0x00 summary
In the previous article, we have learned the basic distributed modules of PyTorch and introduced several official examples. Next, we will introduce the elastic training of PyTorch. This article is the second, focusing on how to s ...
Added by AbeFroman on Mon, 03 Jan 2022 15:14:35 +0200
[Baidu AI Studio] MarTech Challenge click anti fraud forecast
background
Advertising fraud is one of the important challenges that digital marketing needs to face. Click fraud will waste advertisers a lot of money and mislead click data. The competition provided about 500000 hits. Special attention: we simulated the data, hid the meaning of some features, and desensitized them.
Please predict whether th ...
Added by shellyrobson on Mon, 03 Jan 2022 11:40:44 +0200
Teach you how to build a reinforcement learning environment and build a visual training game environment with pygame
Visual training environment
Reinforcement learning is basically used for learning in many open source environments, It's enough for beginners to use gym gym is built based on pyglet, but it can't achieve a relatively tall effect, and it's not as good as pygame in many places
pygame
Pygame is a set of cross platform Python modules for creatin ...
Added by seraulu1 on Mon, 03 Jan 2022 09:31:20 +0200