会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
呦呦南山
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
11
12
13
14
15
16
下一页
2021年9月19日
@abstractmethod @static等的作用
摘要: @abstractmethod 经常在函数定义的之前出现,它的意思是,当前函数的定义是固定的,继承该函数时无法修改其内容。
阅读全文
posted @ 2021-09-19 14:08 呦呦南山
阅读(91)
评论(0)
推荐(0)
2021年9月18日
数据导入及验证
摘要: def load_data_from_gfootball(args): data_path = "/home/longfei-fwxz/offline-rl/offline/datasets/gfootball/data/0890.pkl" print("args:",args) # envs =
阅读全文
posted @ 2021-09-18 17:47 呦呦南山
阅读(94)
评论(0)
推荐(0)
比较两个数组是否一致,返回True/false
摘要: (data["next_obs"][i] != data["obs"][i+1]).all() 用.all()即可
阅读全文
posted @ 2021-09-18 17:38 呦呦南山
阅读(181)
评论(0)
推荐(0)
no module ***
摘要: import osimport sysfrom pathlib import Pathsys.path.append("..")current_dir = os.path.abspath(os.path.dirname(__file__))parent_path = os.path.dirname(
阅读全文
posted @ 2021-09-18 00:07 呦呦南山
阅读(32)
评论(0)
推荐(0)
2021年9月17日
one_hot编码
摘要: src0 = torch.tensor([[ 0.], [1.], [2.], [3.], [4.], [5.], [1.], [2.], [3.], [3.], [0.], [1.], [4.]]) src = np.array(src0).squeeze() torch.eye(6)[src,:
阅读全文
posted @ 2021-09-17 01:14 呦呦南山
阅读(29)
评论(0)
推荐(0)
2021年9月15日
render设置
摘要: render设置为false则可以避免在训练时渲染,节省时间和资源。 一般都是在超参数设置,但有时也直接在环境定义的时候修改,注意要根据具体情况来定。 比如: need_render = (rank == 0) and not isEval self.env = football_env.creat
阅读全文
posted @ 2021-09-15 12:10 呦呦南山
阅读(107)
评论(0)
推荐(0)
2021年9月14日
RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
摘要: 在代码中设置指定GPU,代码仍旧运行不成功 device = torch.device(“cuda:3” if torch.cuda.is_available() else “cpu”)model = model.to(device) 在上面的代码前面添加了代码torch.cuda.set_devi
阅读全文
posted @ 2021-09-14 23:21 呦呦南山
阅读(4049)
评论(2)
推荐(1)
*** RuntimeError: CUDA error: out of memory.
摘要: CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect. For debugging consider passing
阅读全文
posted @ 2021-09-14 21:24 呦呦南山
阅读(16656)
评论(0)
推荐(1)
2021年9月9日
tmux——一个会话多个窗口展示 常用指令
摘要: 安装: pip install tmux 常用指令及快捷键: 查看所有的tmux会话:tmux ls ,快捷键 ctrl + b s 新建设tmux窗口: tmux new -s <session-name> 重命名会话: tmux rename-session -t <old-name> <new
阅读全文
posted @ 2021-09-09 12:22 呦呦南山
阅读(3829)
评论(0)
推荐(0)
2021年9月1日
pdb 调试
摘要: import pdb pdb.set_trace()
阅读全文
posted @ 2021-09-01 16:33 呦呦南山
阅读(36)
评论(0)
推荐(0)
上一页
1
···
11
12
13
14
15
16
下一页
公告