一区二区三区三上|欧美在线视频五区|国产午夜无码在线观看视频|亚洲国产裸体网站|无码成年人影视|亚洲AV亚洲AV|成人开心激情五月|欧美性爱内射视频|超碰人人干人人上|一区二区无码三区亚洲人区久久精品

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評(píng)論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會(huì)員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識(shí)你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

7個(gè)流行的強(qiáng)化學(xué)習(xí)算法及代碼實(shí)現(xiàn)

Dbwd_Imgtec ? 來源:未知 ? 2023-02-03 20:15 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

作者:Siddhartha Pramanik來源:DeepHub IMBA

目前流行的強(qiáng)化學(xué)習(xí)算法包括 Q-learning、SARSA、DDPG、A2C、PPO、DQN 和 TRPO。這些算法已被用于在游戲、機(jī)器人和決策制定等各種應(yīng)用中,并且這些流行的算法還在不斷發(fā)展和改進(jìn),本文我們將對(duì)其做一個(gè)簡(jiǎn)單的介紹。

f5048b68-a3bb-11ed-bfe3-dac502259ad0.png
1、Q-learningQ-learning:Q-learning 是一種無(wú)模型、非策略的強(qiáng)化學(xué)習(xí)算法。它使用 Bellman 方程估計(jì)最佳動(dòng)作值函數(shù),該方程迭代地更新給定狀態(tài)動(dòng)作對(duì)的估計(jì)值。Q-learning 以其簡(jiǎn)單性和處理大型連續(xù)狀態(tài)空間的能力而聞名。下面是一個(gè)使用 Python 實(shí)現(xiàn) Q-learning 的簡(jiǎn)單示例:
 import numpy as np
 
 # Define the Q-table and the learning rate
 Q = np.zeros((state_space_size, action_space_size))
 alpha = 0.1
 
 # Define the exploration rate and discount factor
 epsilon = 0.1
 gamma = 0.99
 
 for episode in range(num_episodes):
     current_state = initial_state
     while not done:
         # Choose an action using an epsilon-greedy policy
         if np.random.uniform(0, 1) < epsilon:
             action = np.random.randint(0, action_space_size)
         else:
             action = np.argmax(Q[current_state])
 
         # Take the action and observe the next state and reward
         next_state, reward, done = take_action(current_state, action)
 
         # Update the Q-table using the Bellman equation
         Q[current_state, action] = Q[current_state, action] + alpha * (reward + gamma * np.max(Q[next_state]) - Q[current_state, action])
 
         current_state = next_state

上面的示例中,state_space_size 和 action_space_size 分別是環(huán)境中的狀態(tài)數(shù)和動(dòng)作數(shù)。num_episodes 是要為運(yùn)行算法的輪次數(shù)。initial_state 是環(huán)境的起始狀態(tài)。take_action(current_state, action) 是一個(gè)函數(shù),它將當(dāng)前狀態(tài)和一個(gè)動(dòng)作作為輸入,并返回下一個(gè)狀態(tài)、獎(jiǎng)勵(lì)和一個(gè)指示輪次是否完成的布爾值。

在 while 循環(huán)中,使用 epsilon-greedy 策略根據(jù)當(dāng)前狀態(tài)選擇一個(gè)動(dòng)作。使用概率 epsilon選擇一個(gè)隨機(jī)動(dòng)作,使用概率 1-epsilon選擇對(duì)當(dāng)前狀態(tài)具有最高 Q 值的動(dòng)作。采取行動(dòng)后,觀察下一個(gè)狀態(tài)和獎(jiǎng)勵(lì),使用Bellman方程更新q。并將當(dāng)前狀態(tài)更新為下一個(gè)狀態(tài)。這只是 Q-learning 的一個(gè)簡(jiǎn)單示例,并未考慮 Q-table 的初始化和要解決的問題的具體細(xì)節(jié)。
2、SARSASARSA:SARSA 是一種無(wú)模型、基于策略的強(qiáng)化學(xué)習(xí)算法。它也使用Bellman方程來估計(jì)動(dòng)作價(jià)值函數(shù),但它是基于下一個(gè)動(dòng)作的期望值,而不是像 Q-learning 中的最優(yōu)動(dòng)作。SARSA 以其處理隨機(jī)動(dòng)力學(xué)問題的能力而聞名。

	
 import numpy as np
 
 # Define the Q-table and the learning rate
 Q = np.zeros((state_space_size, action_space_size))
 alpha = 0.1
 
 # Define the exploration rate and discount factor
 epsilon = 0.1
 gamma = 0.99
 
 for episode in range(num_episodes):
     current_state = initial_state
     action = epsilon_greedy_policy(epsilon, Q, current_state)
     while not done:
         # Take the action and observe the next state and reward
         next_state, reward, done = take_action(current_state, action)
         # Choose next action using epsilon-greedy policy
         next_action = epsilon_greedy_policy(epsilon, Q, next_state)
         # Update the Q-table using the Bellman equation
         Q[current_state, action] = Q[current_state, action] + alpha * (reward + gamma * Q[next_state, next_action] - Q[current_state, action])
         current_state = next_state
         action = next_action

state_space_size和action_space_size分別是環(huán)境中的狀態(tài)和操作的數(shù)量。num_episodes是您想要運(yùn)行SARSA算法的輪次數(shù)。Initial_state是環(huán)境的初始狀態(tài)。take_action(current_state, action)是一個(gè)將當(dāng)前狀態(tài)和作為操作輸入的函數(shù),并返回下一個(gè)狀態(tài)、獎(jiǎng)勵(lì)和一個(gè)指示情節(jié)是否完成的布爾值。

在while循環(huán)中,使用在單獨(dú)的函數(shù)epsilon_greedy_policy(epsilon, Q, current_state)中定義的epsilon-greedy策略來根據(jù)當(dāng)前狀態(tài)選擇操作。使用概率 epsilon選擇一個(gè)隨機(jī)動(dòng)作,使用概率 1-epsilon對(duì)當(dāng)前狀態(tài)具有最高 Q 值的動(dòng)作。上面與Q-learning相同,但是采取了一個(gè)行動(dòng)后,在觀察下一個(gè)狀態(tài)和獎(jiǎng)勵(lì)時(shí)它然后使用貪心策略選擇下一個(gè)行動(dòng)。并使用Bellman方程更新q表。
3、DDPGDDPG 是一種用于連續(xù)動(dòng)作空間的無(wú)模型、非策略算法。它是一種actor-critic算法,其中actor網(wǎng)絡(luò)用于選擇動(dòng)作,而critic網(wǎng)絡(luò)用于評(píng)估動(dòng)作。DDPG 對(duì)于機(jī)器人控制和其他連續(xù)控制任務(wù)特別有用。

	
 import numpy as np
 from keras.models import Model, Sequential
 from keras.layers import Dense, Input
 from keras.optimizers import Adam
 
 # Define the actor and critic models
 actor = Sequential()
 actor.add(Dense(32, input_dim=state_space_size, activation='relu'))
 actor.add(Dense(32, activation='relu'))
 actor.add(Dense(action_space_size, activation='tanh'))
 actor.compile(loss='mse', optimizer=Adam(lr=0.001))
 
 critic = Sequential()
 critic.add(Dense(32, input_dim=state_space_size, activation='relu'))
 critic.add(Dense(32, activation='relu'))
 critic.add(Dense(1, activation='linear'))
 critic.compile(loss='mse', optimizer=Adam(lr=0.001))
 
 # Define the replay buffer
 replay_buffer = []
 
 # Define the exploration noise
 exploration_noise = OrnsteinUhlenbeckProcess(size=action_space_size, theta=0.15, mu=0, sigma=0.2)
 
 for episode in range(num_episodes):
     current_state = initial_state
     while not done:
         # Select an action using the actor model and add exploration noise
         action = actor.predict(current_state)[0] + exploration_noise.sample()
         action = np.clip(action, -1, 1)
 
         # Take the action and observe the next state and reward
         next_state, reward, done = take_action(current_state, action)
 
         # Add the experience to the replay buffer
         replay_buffer.append((current_state, action, reward, next_state, done))
 
         # Sample a batch of experiences from the replay buffer
         batch = sample(replay_buffer, batch_size)
 
         # Update the critic model
         states = np.array([x[0] for x in batch])
         actions = np.array([x[1] for x in batch])
         rewards = np.array([x[2] for x in batch])
         next_states = np.array([x[3] for x in batch])
 
         target_q_values = rewards + gamma * critic.predict(next_states)
         critic.train_on_batch(states, target_q_values)
 
         # Update the actor model
         action_gradients = np.array(critic.get_gradients(states, actions))
         actor.train_on_batch(states, action_gradients)
 
         current_state = next_state
在本例中,state_space_size和action_space_size分別是環(huán)境中的狀態(tài)和操作的數(shù)量。num_episodes是輪次數(shù)。Initial_state是環(huán)境的初始狀態(tài)。Take_action (current_state, action)是一個(gè)函數(shù),它接受當(dāng)前狀態(tài)和操作作為輸入,并返回下一個(gè)操作。
4、A2CA2C(Advantage Actor-Critic)是一種有策略的actor-critic算法,它使用Advantage函數(shù)來更新策略。該算法實(shí)現(xiàn)簡(jiǎn)單,可以處理離散和連續(xù)的動(dòng)作空間。

	
 import numpy as np
 from keras.models import Model, Sequential
 from keras.layers import Dense, Input
 from keras.optimizers import Adam
 from keras.utils import to_categorical
 
 # Define the actor and critic models
 state_input = Input(shape=(state_space_size,))
 actor = Dense(32, activation='relu')(state_input)
 actor = Dense(32, activation='relu')(actor)
 actor = Dense(action_space_size, activation='softmax')(actor)
 actor_model = Model(inputs=state_input, outputs=actor)
 actor_model.compile(loss='categorical_crossentropy', optimizer=Adam(lr=0.001))
 
 state_input = Input(shape=(state_space_size,))
 critic = Dense(32, activation='relu')(state_input)
 critic = Dense(32, activation='relu')(critic)
 critic = Dense(1, activation='linear')(critic)
 critic_model = Model(inputs=state_input, outputs=critic)
 critic_model.compile(loss='mse', optimizer=Adam(lr=0.001))
 
 for episode in range(num_episodes):
     current_state = initial_state
     done = False
     while not done:
         # Select an action using the actor model and add exploration noise
         action_probs = actor_model.predict(np.array([current_state]))[0]
         action = np.random.choice(range(action_space_size), p=action_probs)
 
         # Take the action and observe the next state and reward
         next_state, reward, done = take_action(current_state, action)
 
         # Calculate the advantage
         target_value = critic_model.predict(np.array([next_state]))[0][0]
         advantage = reward + gamma * target_value - critic_model.predict(np.array([current_state]))[0][0]
 
         # Update the actor model
         action_one_hot = to_categorical(action, action_space_size)
         actor_model.train_on_batch(np.array([current_state]), advantage * action_one_hot)
 
         # Update the critic model
         critic_model.train_on_batch(np.array([current_state]), reward + gamma * target_value)
 
         current_state = next_state
在這個(gè)例子中,actor模型是一個(gè)神經(jīng)網(wǎng)絡(luò),它有2個(gè)隱藏層,每個(gè)隱藏層有32個(gè)神經(jīng)元,具有relu激活函數(shù),輸出層具有softmax激活函數(shù)。critic模型也是一個(gè)神經(jīng)網(wǎng)絡(luò),它有2個(gè)隱含層,每層32個(gè)神經(jīng)元,具有relu激活函數(shù),輸出層具有線性激活函數(shù)。使用分類交叉熵?fù)p失函數(shù)訓(xùn)練actor模型,使用均方誤差損失函數(shù)訓(xùn)練critic模型。動(dòng)作是根據(jù)actor模型預(yù)測(cè)選擇的,并添加了用于探索的噪聲。
5、PPOPPO(Proximal Policy Optimization)是一種策略算法,它使用信任域優(yōu)化的方法來更新策略。它在具有高維觀察和連續(xù)動(dòng)作空間的環(huán)境中特別有用。PPO 以其穩(wěn)定性和高樣品效率而著稱。

	
 import numpy as np
 from keras.models import Model, Sequential
 from keras.layers import Dense, Input
 from keras.optimizers import Adam
 
 # Define the policy model
 state_input = Input(shape=(state_space_size,))
 policy = Dense(32, activation='relu')(state_input)
 policy = Dense(32, activation='relu')(policy)
 policy = Dense(action_space_size, activation='softmax')(policy)
 policy_model = Model(inputs=state_input, outputs=policy)
 
 # Define the value model
 value_model = Model(inputs=state_input, outputs=Dense(1, activation='linear')(policy))
 
 # Define the optimizer
 optimizer = Adam(lr=0.001)
 
 for episode in range(num_episodes):
     current_state = initial_state
     while not done:
         # Select an action using the policy model
         action_probs = policy_model.predict(np.array([current_state]))[0]
         action = np.random.choice(range(action_space_size), p=action_probs)
 
         # Take the action and observe the next state and reward
         next_state, reward, done = take_action(current_state, action)
 
         # Calculate the advantage
         target_value = value_model.predict(np.array([next_state]))[0][0]
         advantage = reward + gamma * target_value - value_model.predict(np.array([current_state]))[0][0]
 
         # Calculate the old and new policy probabilities
         old_policy_prob = action_probs[action]
         new_policy_prob = policy_model.predict(np.array([next_state]))[0][action]
 
         # Calculate the ratio and the surrogate loss
         ratio = new_policy_prob / old_policy_prob
         surrogate_loss = np.minimum(ratio * advantage, np.clip(ratio, 1 - epsilon, 1 + epsilon) * advantage)
 
         # Update the policy and value models
         policy_model.trainable_weights = value_model.trainable_weights
         policy_model.compile(optimizer=optimizer, loss=-surrogate_loss)
         policy_model.train_on_batch(np.array([current_state]), np.array([action_one_hot]))
         value_model.train_on_batch(np.array([current_state]), reward + gamma * target_value)
 
         current_state = next_state

6、DQNDQN(深度 Q 網(wǎng)絡(luò))是一種無(wú)模型、非策略算法,它使用神經(jīng)網(wǎng)絡(luò)來逼近 Q 函數(shù)。DQN 特別適用于 Atari 游戲和其他類似問題,其中狀態(tài)空間是高維的,并使用神經(jīng)網(wǎng)絡(luò)近似 Q 函數(shù)。
 import numpy as np
 from keras.models import Sequential
 from keras.layers import Dense, Input
 from keras.optimizers import Adam
 from collections import deque
 
 # Define the Q-network model
 model = Sequential()
 model.add(Dense(32, input_dim=state_space_size, activation='relu'))
 model.add(Dense(32, activation='relu'))
 model.add(Dense(action_space_size, activation='linear'))
 model.compile(loss='mse', optimizer=Adam(lr=0.001))
 
 # Define the replay buffer
 replay_buffer = deque(maxlen=replay_buffer_size)
 
 for episode in range(num_episodes):
     current_state = initial_state
     while not done:
         # Select an action using an epsilon-greedy policy
         if np.random.rand() < epsilon:
             action = np.random.randint(0, action_space_size)
         else:
             action = np.argmax(model.predict(np.array([current_state]))[0])
 
         # Take the action and observe the next state and reward
         next_state, reward, done = take_action(current_state, action)
 
         # Add the experience to the replay buffer
         replay_buffer.append((current_state, action, reward, next_state, done))
 
         # Sample a batch of experiences from the replay buffer
         batch = random.sample(replay_buffer, batch_size)
 
         # Prepare the inputs and targets for the Q-network
         inputs = np.array([x[0] for x in batch])
         targets = model.predict(inputs)
         for i, (state, action, reward, next_state, done) in enumerate(batch):
             if done:
                 targets[i, action] = reward
             else:
                 targets[i, action] = reward + gamma * np.max(model.predict(np.array([next_state]))[0])
 
         # Update the Q-network
         model.train_on_batch(inputs, targets)
 
         current_state = next_state
上面的代碼,Q-network有2個(gè)隱藏層,每個(gè)隱藏層有32個(gè)神經(jīng)元,使用relu激活函數(shù)。該網(wǎng)絡(luò)使用均方誤差損失函數(shù)和Adam優(yōu)化器進(jìn)行訓(xùn)練。
7、TRPOTRPO (Trust Region Policy Optimization)是一種無(wú)模型的策略算法,它使用信任域優(yōu)化方法來更新策略。它在具有高維觀察和連續(xù)動(dòng)作空間的環(huán)境中特別有用。TRPO 是一個(gè)復(fù)雜的算法,需要多個(gè)步驟和組件來實(shí)現(xiàn)。TRPO不是用幾行代碼就能實(shí)現(xiàn)的簡(jiǎn)單算法。所以我們這里使用實(shí)現(xiàn)了TRPO的現(xiàn)有庫(kù),例如OpenAI Baselines,它提供了包括TRPO在內(nèi)的各種預(yù)先實(shí)現(xiàn)的強(qiáng)化學(xué)習(xí)算法,。要在OpenAI Baselines中使用TRPO,我們需要安裝:

	
 pip install baselines
然后可以使用baselines庫(kù)中的trpo_mpi模塊在你的環(huán)境中訓(xùn)練TRPO代理,這里有一個(gè)簡(jiǎn)單的例子:
 import gym
 from baselines.common.vec_env.dummy_vec_env import DummyVecEnv
 from baselines.trpo_mpi import trpo_mpi
 
 #Initialize the environment
 env = gym.make("CartPole-v1")
 env = DummyVecEnv([lambda: env])
 
 # Define the policy network
 policy_fn = mlp_policy
 
 #Train the TRPO model
 model = trpo_mpi.learn(env, policy_fn, max_iters=1000)
我們使用Gym庫(kù)初始化環(huán)境。然后定義策略網(wǎng)絡(luò),并調(diào)用TRPO模塊中的learn()函數(shù)來訓(xùn)練模型。還有許多其他庫(kù)也提供了TRPO的實(shí)現(xiàn),例如TensorFlow、PyTorch和RLLib。下面時(shí)一個(gè)使用TF 2.0實(shí)現(xiàn)的樣例
 import tensorflow as tf
 import gym
 
 # Define the policy network
 class PolicyNetwork(tf.keras.Model):
     def __init__(self):
         super(PolicyNetwork, self).__init__()
         self.dense1 = tf.keras.layers.Dense(16, activation='relu')
         self.dense2 = tf.keras.layers.Dense(16, activation='relu')
         self.dense3 = tf.keras.layers.Dense(1, activation='sigmoid')
 
     def call(self, inputs):
         x = self.dense1(inputs)
         x = self.dense2(x)
         x = self.dense3(x)
         return x
 
 # Initialize the environment
 env = gym.make("CartPole-v1")
 
 # Initialize the policy network
 policy_network = PolicyNetwork()
 
 # Define the optimizer
 optimizer = tf.optimizers.Adam()
 
 # Define the loss function
 loss_fn = tf.losses.BinaryCrossentropy()
 
 # Set the maximum number of iterations
 max_iters = 1000
 
 # Start the training loop
 for i in range(max_iters):
     # Sample an action from the policy network
     action = tf.squeeze(tf.random.categorical(policy_network(observation), 1))
 
     # Take a step in the environment
     observation, reward, done, _ = env.step(action)
 
     with tf.GradientTape() as tape:
         # Compute the loss
         loss = loss_fn(reward, policy_network(observation))
 
     # Compute the gradients
     grads = tape.gradient(loss, policy_network.trainable_variables)
 
     # Perform the update step
     optimizer.apply_gradients(zip(grads, policy_network.trainable_variables))
 
     if done:
         # Reset the environment
         observation = env.reset()
在這個(gè)例子中,我們首先使用TensorFlow的Keras API定義一個(gè)策略網(wǎng)絡(luò)。然后使用Gym庫(kù)和策略網(wǎng)絡(luò)初始化環(huán)境。然后定義用于訓(xùn)練策略網(wǎng)絡(luò)的優(yōu)化器和損失函數(shù)。在訓(xùn)練循環(huán)中,從策略網(wǎng)絡(luò)中采樣一個(gè)動(dòng)作,在環(huán)境中前進(jìn)一步,然后使用TensorFlow的GradientTape計(jì)算損失和梯度。然后我們使用優(yōu)化器執(zhí)行更新步驟。這是一個(gè)簡(jiǎn)單的例子,只展示了如何在TensorFlow 2.0中實(shí)現(xiàn)TRPO。TRPO是一個(gè)非常復(fù)雜的算法,這個(gè)例子沒有涵蓋所有的細(xì)節(jié),但它是試驗(yàn)TRPO的一個(gè)很好的起點(diǎn)。
總結(jié)

以上就是我們總結(jié)的7個(gè)常用的強(qiáng)化學(xué)習(xí)算法,這些算法并不相互排斥,通常與其他技術(shù)(如值函數(shù)逼近、基于模型的方法和集成方法)結(jié)合使用,可以獲得更好的結(jié)果。

END

歡迎加入Imagination GPU人工智能交流2群f5173222-a3bb-11ed-bfe3-dac502259ad0.jpg入群請(qǐng)加小編微信:eetrend89

(添加請(qǐng)備注公司名和職稱)

推薦閱讀 對(duì)話Imagination中國(guó)區(qū)董事長(zhǎng):以GPU為支點(diǎn)加強(qiáng)軟硬件協(xié)同,助力數(shù)字化轉(zhuǎn)型

手機(jī)芯片這個(gè)功能,有望改變市場(chǎng)格局!

Imagination Technologies是一家總部位于英國(guó)的公司,致力于研發(fā)芯片和軟件知識(shí)產(chǎn)權(quán)(IP),基于Imagination IP的產(chǎn)品已在全球數(shù)十億人的電話、汽車、家庭和工作 場(chǎng)所中使用。獲取更多物聯(lián)網(wǎng)、智能穿戴、通信、汽車電子、圖形圖像開發(fā)等前沿技術(shù)信息,歡迎關(guān)注 Imagination Tech!


原文標(biāo)題:7個(gè)流行的強(qiáng)化學(xué)習(xí)算法及代碼實(shí)現(xiàn)

文章出處:【微信公眾號(hào):Imagination Tech】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。


聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場(chǎng)。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請(qǐng)聯(lián)系本站處理。 舉報(bào)投訴
  • imagination
    +關(guān)注

    關(guān)注

    1

    文章

    600

    瀏覽量

    62220

原文標(biāo)題:7個(gè)流行的強(qiáng)化學(xué)習(xí)算法及代碼實(shí)現(xiàn)

文章出處:【微信號(hào):Imgtec,微信公眾號(hào):Imagination Tech】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。

收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評(píng)論

    相關(guān)推薦
    熱點(diǎn)推薦

    NVIDIA Isaac Lab可用環(huán)境與強(qiáng)化學(xué)習(xí)腳本使用指南

    Lab 是一個(gè)適用于機(jī)器人學(xué)習(xí)的開源模塊化框架,其模塊化高保真仿真適用于各種訓(xùn)練環(huán)境,Isaac Lab 同時(shí)支持模仿學(xué)習(xí)(模仿人類)和強(qiáng)化學(xué)習(xí)(在嘗試和錯(cuò)誤中進(jìn)行
    的頭像 發(fā)表于 07-14 15:29 ?549次閱讀
    NVIDIA Isaac Lab可用環(huán)境與<b class='flag-5'>強(qiáng)化學(xué)習(xí)</b>腳本使用指南

    【書籍評(píng)測(cè)活動(dòng)NO.62】一本書讀懂 DeepSeek 全家桶核心技術(shù):DeepSeek 核心技術(shù)揭秘

    能力的自主進(jìn)化。 02.GRPO 算法 GRPO 算法是 DeepSeek-R1-Zero 使用的另一個(gè)重要的創(chuàng)新算法。與傳統(tǒng)的強(qiáng)化學(xué)習(xí)
    發(fā)表于 06-09 14:38

    代碼革命的先鋒:aiXcoder-7B模型介紹

    ? ? 國(guó)內(nèi)開源代碼大模型 4月9日aiXcoder宣布正式開源其7B模型Base版,僅僅過去一個(gè)禮拜,aiXcoder-7B在軟件源代碼
    的頭像 發(fā)表于 05-20 14:41 ?253次閱讀
    <b class='flag-5'>代碼</b>革命的先鋒:aiXcoder-<b class='flag-5'>7</b>B模型介紹

    18個(gè)常用的強(qiáng)化學(xué)習(xí)算法整理:從基礎(chǔ)方法到高級(jí)模型的理論技術(shù)與代碼實(shí)現(xiàn)

    本來轉(zhuǎn)自:DeepHubIMBA本文系統(tǒng)講解從基本強(qiáng)化學(xué)習(xí)方法到高級(jí)技術(shù)(如PPO、A3C、PlaNet等)的實(shí)現(xiàn)原理與編碼過程,旨在通過理論結(jié)合代碼的方式,構(gòu)建對(duì)強(qiáng)化學(xué)習(xí)
    的頭像 發(fā)表于 04-23 13:22 ?405次閱讀
    18<b class='flag-5'>個(gè)</b>常用的<b class='flag-5'>強(qiáng)化學(xué)習(xí)</b><b class='flag-5'>算法</b>整理:從基礎(chǔ)方法到高級(jí)模型的理論技術(shù)與<b class='flag-5'>代碼</b><b class='flag-5'>實(shí)現(xiàn)</b>

    基于RV1126開發(fā)板實(shí)現(xiàn)學(xué)習(xí)圖像分類方案

    在RV1126開發(fā)板上實(shí)現(xiàn)學(xué)習(xí):在識(shí)別前對(duì)物體圖片進(jìn)行模型學(xué)習(xí),訓(xùn)練完成后通過算法分類得出圖像的模型ID。 方案設(shè)計(jì)邏輯流程圖,方案
    的頭像 發(fā)表于 04-21 13:37 ?11次閱讀
    基于RV1126開發(fā)板<b class='flag-5'>實(shí)現(xiàn)</b>自<b class='flag-5'>學(xué)習(xí)</b>圖像分類方案

    詳解RAD端到端強(qiáng)化學(xué)習(xí)后訓(xùn)練范式

    受限于算力和數(shù)據(jù),大語(yǔ)言模型預(yù)訓(xùn)練的 scalinglaw 已經(jīng)趨近于極限。DeepSeekR1/OpenAl01通過強(qiáng)化學(xué)習(xí)后訓(xùn)練涌現(xiàn)了強(qiáng)大的推理能力,掀起新一輪技術(shù)革新。
    的頭像 發(fā)表于 02-25 14:06 ?595次閱讀
    詳解RAD端到端<b class='flag-5'>強(qiáng)化學(xué)習(xí)</b>后訓(xùn)練范式

    淺談適用規(guī)模充電站的深度學(xué)習(xí)有序充電策略

    深度強(qiáng)化學(xué)習(xí)能夠有效計(jì)及電動(dòng)汽車出行模式和充電需求的不確定性,實(shí)現(xiàn)充電場(chǎng)站充電成本化的目標(biāo)。通過對(duì)電動(dòng)汽車泊車時(shí)間和充電需求特征進(jìn)行提取,建立適用于大規(guī)模電動(dòng)汽車有序充電的馬爾可夫決策過程模型,并
    的頭像 發(fā)表于 02-08 15:00 ?536次閱讀
    淺談適用規(guī)模充電站的深度<b class='flag-5'>學(xué)習(xí)</b>有序充電策略

    個(gè)月速成python+OpenCV圖像處理

    適用于哪些場(chǎng)景,然后通過Python編寫代碼實(shí)現(xiàn)這些算法,并應(yīng)用于實(shí)際項(xiàng)目中,實(shí)現(xiàn)圖像的檢測(cè)、識(shí)別、分類、定位、測(cè)量等目標(biāo)。本文將介紹一個(gè)
    的頭像 發(fā)表于 11-29 18:27 ?460次閱讀
    一<b class='flag-5'>個(gè)</b>月速成python+OpenCV圖像處理

    螞蟻集團(tuán)收購(gòu)邊塞科技,吳翼出任強(qiáng)化學(xué)習(xí)實(shí)驗(yàn)室首席科學(xué)家

    近日,專注于模型賽道的初創(chuàng)企業(yè)邊塞科技宣布被螞蟻集團(tuán)收購(gòu)。據(jù)悉,此次交易完成后,邊塞科技將保持獨(dú)立運(yùn)營(yíng),而原投資人已全部退出。 與此同時(shí),螞蟻集團(tuán)近期宣布成立強(qiáng)化學(xué)習(xí)實(shí)驗(yàn)室,旨在推動(dòng)大模型強(qiáng)化學(xué)習(xí)
    的頭像 發(fā)表于 11-22 11:14 ?1578次閱讀

    【「從算法到電路—數(shù)字芯片算法的電路實(shí)現(xiàn)」閱讀體驗(yàn)】+一本介紹基礎(chǔ)硬件算法模塊實(shí)現(xiàn)的好書

    ,少了再給多點(diǎn)”,本文微信公眾號(hào)”嵌入式Lee”中分享了一些列sigma delta思想相關(guān)的文章,比較使用sigma delta思想,幾行代碼就可以實(shí)現(xiàn)降幀率算法,感興趣可以關(guān)注公眾號(hào)查找對(duì)應(yīng)
    發(fā)表于 11-20 13:42

    NPU與機(jī)器學(xué)習(xí)算法的關(guān)系

    在人工智能領(lǐng)域,機(jī)器學(xué)習(xí)算法實(shí)現(xiàn)智能系統(tǒng)的核心。隨著數(shù)據(jù)量的激增和算法復(fù)雜度的提升,對(duì)計(jì)算資源的需求也在不斷增長(zhǎng)。NPU作為一種專門為深度學(xué)習(xí)
    的頭像 發(fā)表于 11-15 09:19 ?1216次閱讀

    如何使用 PyTorch 進(jìn)行強(qiáng)化學(xué)習(xí)

    的計(jì)算圖和自動(dòng)微分功能,非常適合實(shí)現(xiàn)復(fù)雜的強(qiáng)化學(xué)習(xí)算法。 1. 環(huán)境(Environment) 在強(qiáng)化學(xué)習(xí)中,環(huán)境是一個(gè)抽象的概念,它定義了
    的頭像 發(fā)表于 11-05 17:34 ?1042次閱讀

    Pure path studio內(nèi)能否自己創(chuàng)建一個(gè)component,來實(shí)現(xiàn)特定的算法,例如LMS算法?

    TLV320AIC3254EVM-K評(píng)估模塊, Pure path studio軟件開發(fā)環(huán)境。 問題:1.Pure path studio 內(nèi)能否自己創(chuàng)建一個(gè)component,來實(shí)現(xiàn)特定的算法
    發(fā)表于 11-01 08:25

    “0元購(gòu)”智元靈犀X1機(jī)器人,軟硬件全套圖紙和代碼全公開!資料免費(fèi)下載!

    ”軟件算法代碼+高性能關(guān)節(jié)電機(jī),讓“人形機(jī)器人人人造”的理想真正成為現(xiàn)實(shí),不管是愛好者還是科技達(dá)人,都能夠迅速搭建機(jī)器人并實(shí)現(xiàn)基本的行走功能,還可以通過智元機(jī)器人提供的強(qiáng)化學(xué)習(xí)等先進(jìn)
    發(fā)表于 10-25 15:20

    谷歌AlphaChip強(qiáng)化學(xué)習(xí)工具發(fā)布,聯(lián)發(fā)科天璣芯片率先采用

    近日,谷歌在芯片設(shè)計(jì)領(lǐng)域取得了重要突破,詳細(xì)介紹了其用于芯片設(shè)計(jì)布局的強(qiáng)化學(xué)習(xí)方法,并將該模型命名為“AlphaChip”。據(jù)悉,AlphaChip有望顯著加速芯片布局規(guī)劃的設(shè)計(jì)流程,并幫助芯片在性能、功耗和面積方面實(shí)現(xiàn)更優(yōu)表現(xiàn)。
    的頭像 發(fā)表于 09-30 16:16 ?701次閱讀