把linux系统下的脚本baseline.sh修改为windows系统下的脚本baseline.bat

#!/bin/sh

model="configs/abide_schaefer100/TUs_graph_classification_ContrastPool_abide_schaefer100_100k.json"
echo ${model}
python main.py --config  $model --gpu_id 0 --node_feat_transform pearson --max_time 60 --init_lr 1e-2 --threshold 0.0 --batch_size 20 --dropout 0.0 --contrast --pool_ratio 0.5 --lambda1 1e-3 --L 2

2

#!/bin/sh这个是用来声明解释器的,可能linux下有多种解释器吧,需要声明为sh解释器。
而在win环境下,不需要这一句来声明解释器。

3

model="configs/abide_schaefer100/TUs_graph_classification_ContrastPool_abide_schaefer100_100k.json"这句话是声明model所对应的配置文件。
set model="configs\abide_schaefer100\TUs_graph_classification_ContrastPool_abide_schaefer100_100k.json"

从linux环境下转换为win环境下需要加一个set关键字,另外就是修改一下反斜杠。

4

echo ${model}

这句话其实就是输出model的路径,转换为win环境下为:

echo %model%

5

python main.py --config  $model --gpu_id 0 --node_feat_transform pearson --max_time 60 --init_lr 1e-2 --threshold 0.0 --batch_size 20 --dropout 0.0 --contrast --pool_ratio 0.5 --lambda1 1e-3 --L 2

这段其实就是设置了一系列参数:如设置model,使用的gpu,

python main.py --config "%model%" --gpu_id 0 --node_feat_transform pearson --max_time 60 --init_lr 1e-2 --threshold 0.0 --batch_size 20 --dropout 0.0 --contrast --pool_ratio 0.5 --lambda1 1e-3 --L 2

6

这样来看,其实要修改的部分并不是很多。

@echo off
set model="configs\abide_schaefer100\TUs_graph_classification_ContrastPool_abide_schaefer100_100k.json"

python main.py --config "%model%" --gpu_id 0 --node_feat_transform pearson --max_time 60 --init_lr 1e-2 --threshold 0.0 --batch_size 20 --dropout 0.0 --contrast --pool_ratio 0.5 --lambda1 1e-3 --L 2

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值