update
This commit is contained in:
@@ -5,7 +5,7 @@ Author: John
|
||||
Email: johnjim0816@gmail.com
|
||||
Date: 2021-03-12 21:14:12
|
||||
LastEditor: John
|
||||
LastEditTime: 2021-03-31 13:49:06
|
||||
LastEditTime: 2021-05-04 02:45:27
|
||||
Discription:
|
||||
Environment:
|
||||
'''
|
||||
@@ -63,7 +63,7 @@ class Actor(nn.Module):
|
||||
def forward(self, x):
|
||||
x = F.relu(self.linear1(x))
|
||||
x = F.relu(self.linear2(x))
|
||||
x = F.tanh(self.linear3(x))
|
||||
x = torch.tanh(self.linear3(x))
|
||||
return x
|
||||
|
||||
class ActorCritic(nn.Module):
|
||||
|
||||
@@ -5,7 +5,7 @@ Author: John
|
||||
Email: johnjim0816@gmail.com
|
||||
Date: 2021-03-12 16:02:24
|
||||
LastEditor: John
|
||||
LastEditTime: 2021-04-29 15:32:38
|
||||
LastEditTime: 2021-05-04 19:58:31
|
||||
Discription:
|
||||
Environment:
|
||||
'''
|
||||
@@ -13,10 +13,8 @@ import os
|
||||
import numpy as np
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
|
||||
def save_results(rewards,ma_rewards,tag='train',path='./results'):
|
||||
'''保存reward等结果
|
||||
'''save rewards and ma_rewards
|
||||
'''
|
||||
np.save(path+'{}_rewards.npy'.format(tag), rewards)
|
||||
np.save(path+'{}_ma_rewards.npy'.format(tag), ma_rewards)
|
||||
|
||||
Reference in New Issue
Block a user