You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to run the demo,but i can;t find where to import data
parser = argparse.ArgumentParser(
description='Crystal Graph Convolutional Neural Networks')
parser.add_argument('data_options', metavar='OPTIONS', nargs='+',
help='dataset options, started with the path to root dir, '
'then other options')
parser.add_argument('--disable-cuda', action='store_true',
help='Disable CUDA')
parser.add_argument('-j', '--workers', default=1, type=int, metavar='N',
help='number of data loading workers (default: 0)')
parser.add_argument('--epochs', default=30, type=int, metavar='N',
help='number of total epochs to run (default: 30)')
parser.add_argument('--start-epoch', default=20, type=int, metavar='N',
help='manual epoch number (useful on restarts)')
parser.add_argument('-b', '--batch-size', default=10, type=int,
metavar='N', help='mini-batch size (default: 256)')
parser.add_argument('--lr', '--learning-rate', default=0.01, type=float,
metavar='LR', help='initial learning rate (default: '
'0.01)')
parser.add_argument('--lr-milestones', default=[100], nargs='+', type=int,
metavar='N', help='milestones for scheduler (default: '
'[100])')
parser.add_argument('--momentum', default=0.9, type=float, metavar='M',
help='momentum')
parser.add_argument('--weight_decay', '--wd', default=5e-4, type=float,
metavar='W', help='weight decay (default: 0)')
parser.add_argument('--print-freq', '-p', default=10, type=int,
metavar='N', help='print frequency (default: 10)')
parser.add_argument('--resume', default='', type=str, metavar='PATH',
help='path to latest checkpoint (default: none)')
train_group = parser.add_mutually_exclusive_group()
train_group.add_argument('--train-ratio', default=0.8, type=float, metavar='N',
help='number of training data to be loaded (default none)')
train_group.add_argument('--train-size', default=None, type=int, metavar='N',
help='number of training data to be loaded (default none)')
valid_group = parser.add_mutually_exclusive_group()
valid_group.add_argument('--val-ratio', default=0.1, type=float, metavar='N',
help='percentage of validation data to be loaded (default '
'0.1)')
valid_group.add_argument('--val-size', default=None, type=int, metavar='N',
help='number of validation data to be loaded (default '
'1000)')
test_group = parser.add_mutually_exclusive_group()
test_group.add_argument('--test-ratio', default=0.1, type=float, metavar='N',
help='percentage of test data to be loaded (default 0.1)')
test_group.add_argument('--test-size', default=None, type=int, metavar='N',
help='number of test data to be loaded (default 1000)')
parser.add_argument('--optim', default='SGD', type=str, metavar='SGD',
help='choose an optimizer, SGD or Adam, (default: SGD)')
parser.add_argument('--atom-fea-len', default=64, type=int, metavar='N',
help='number of hidden atom features in conv layers')
parser.add_argument('--h-fea-len', default=128, type=int, metavar='N',
help='number of hidden features after pooling')
parser.add_argument('--disable-save-torch', action='store_true',
help='Do not save CIF PyTorch data as .pkl files')
parser.add_argument('--clean-torch', action='store_true',
help='Clean CIF PyTorch data .pkl files')
args = parser.parse_args(sys.argv[1:])
args.cuda = not args.disable_cuda and torch.cuda.is_available()
when I try it in cmd ,it will happen
(DL) E:\GANN-main\GANN-main\demo>python main.py --batch-size 10 --train-ratio 0.8 --val-ratio 0.1 --test-ratio 0.1 --workers 1 --epochs 20 --print-freq 1 data > log.out
Traceback (most recent call last):
File "E:\GANN-main\GANN-main\demo\main.py", line 416, in
main()
File "E:\GANN-main\GANN-main\demo\main.py", line 94, in main
dataset = CIFData(*args.data_options,
AttributeError: 'Namespace' object has no attribute 'data_options'
I want to run the demo,but i can;t find where to import data
parser = argparse.ArgumentParser(
description='Crystal Graph Convolutional Neural Networks')
parser.add_argument('data_options', metavar='OPTIONS', nargs='+',
help='dataset options, started with the path to root dir, '
'then other options')
parser.add_argument('--disable-cuda', action='store_true',
help='Disable CUDA')
parser.add_argument('-j', '--workers', default=1, type=int, metavar='N',
help='number of data loading workers (default: 0)')
parser.add_argument('--epochs', default=30, type=int, metavar='N',
help='number of total epochs to run (default: 30)')
parser.add_argument('--start-epoch', default=20, type=int, metavar='N',
help='manual epoch number (useful on restarts)')
parser.add_argument('-b', '--batch-size', default=10, type=int,
metavar='N', help='mini-batch size (default: 256)')
parser.add_argument('--lr', '--learning-rate', default=0.01, type=float,
metavar='LR', help='initial learning rate (default: '
'0.01)')
parser.add_argument('--lr-milestones', default=[100], nargs='+', type=int,
metavar='N', help='milestones for scheduler (default: '
'[100])')
parser.add_argument('--momentum', default=0.9, type=float, metavar='M',
help='momentum')
parser.add_argument('--weight_decay', '--wd', default=5e-4, type=float,
metavar='W', help='weight decay (default: 0)')
parser.add_argument('--print-freq', '-p', default=10, type=int,
metavar='N', help='print frequency (default: 10)')
parser.add_argument('--resume', default='', type=str, metavar='PATH',
help='path to latest checkpoint (default: none)')
train_group = parser.add_mutually_exclusive_group()
train_group.add_argument('--train-ratio', default=0.8, type=float, metavar='N',
help='number of training data to be loaded (default none)')
train_group.add_argument('--train-size', default=None, type=int, metavar='N',
help='number of training data to be loaded (default none)')
valid_group = parser.add_mutually_exclusive_group()
valid_group.add_argument('--val-ratio', default=0.1, type=float, metavar='N',
help='percentage of validation data to be loaded (default '
'0.1)')
valid_group.add_argument('--val-size', default=None, type=int, metavar='N',
help='number of validation data to be loaded (default '
'1000)')
test_group = parser.add_mutually_exclusive_group()
test_group.add_argument('--test-ratio', default=0.1, type=float, metavar='N',
help='percentage of test data to be loaded (default 0.1)')
test_group.add_argument('--test-size', default=None, type=int, metavar='N',
help='number of test data to be loaded (default 1000)')
parser.add_argument('--optim', default='SGD', type=str, metavar='SGD',
help='choose an optimizer, SGD or Adam, (default: SGD)')
parser.add_argument('--atom-fea-len', default=64, type=int, metavar='N',
help='number of hidden atom features in conv layers')
parser.add_argument('--h-fea-len', default=128, type=int, metavar='N',
help='number of hidden features after pooling')
parser.add_argument('--disable-save-torch', action='store_true',
help='Do not save CIF PyTorch data as .pkl files')
parser.add_argument('--clean-torch', action='store_true',
help='Clean CIF PyTorch data .pkl files')
args = parser.parse_args(sys.argv[1:])
args.cuda = not args.disable_cuda and torch.cuda.is_available()
print(torch.cuda.is_available())
print('args.cuda', args.cuda)
best_mae_error = 1e10
def main():
global args, best_mae_error
thanks
The text was updated successfully, but these errors were encountered: