摘要:
def get_env_shape(task : str) -> Tuple[int, int]: env = get_env(task) obs_dim = env.observation_space.shape action_space = env.action_space if len(obs 阅读全文
posted @ 2022-04-25 21:49
呦呦南山
阅读(41)
评论(0)
推荐(0)
摘要:
def sample_by_num(data_dict: dict, num: int): """ Sample num trajs from data_dict. """ samples = {} for k, v in data_dict.items(): if k == "index": sa 阅读全文
posted @ 2022-04-25 20:22
呦呦南山
阅读(26)
评论(0)
推荐(0)
摘要:
# Prevent concurrent FileExistsErrortry: if not os.path.exists(to_path): os.mkdir(to_path)except Exception: passfrom offlinerl/neorl 阅读全文
posted @ 2022-04-25 18:59
呦呦南山
阅读(18)
评论(0)
推荐(0)
摘要:
data_key = "-".join([task_name_version, data_type, str(least_num), train_or_val])output: 'HalfCheetah-v3-low-100-train'from: offlinerl/neorl 阅读全文
posted @ 2022-04-25 18:56
呦呦南山
阅读(27)
评论(0)
推荐(0)
摘要:
def find_remote_file(data_json, task_name_version, data_type, traj_num, train_or_val): """ Find appropriate least dataset in remote (data_json) accord 阅读全文
posted @ 2022-04-25 18:46
呦呦南山
阅读(23)
评论(0)
推荐(0)
摘要:
def get_file_md5(filename): if not os.path.isfile(filename): return my_hash = hashlib.md5() f = open(filename, 'rb') while True: b = f.read(8096) #set 阅读全文
posted @ 2022-04-25 18:43
呦呦南山
阅读(72)
评论(0)
推荐(0)
摘要:
登录网站的用户名密码数据库是不会以明文密码进行存储的,简单的,可以通过摘要算法得到一个长度固定的数据块。 1、摘要算法格式: import hashlib #导入hashlib模块 md = hashlib.md5() #获取一个md5加密算法对象md.update('how to use md5 阅读全文
posted @ 2022-04-25 16:52
呦呦南山
阅读(508)
评论(0)
推荐(0)
浙公网安备 33010602011771号