whatashot / danet Goto Github PK
View Code? Open in Web Editor NEWDANets (a family of neural networks) for tabular data classification/ regression.
License: MIT License
DANets (a family of neural networks) for tabular data classification/ regression.
License: MIT License
Hi I have a error when inference. May you help check how to solve it? Thank you
I use the best model
Traceback (most recent call last):
File "predict.py", line 58, in
clf.load_model(filepath, input_dim=X_test.shape[1], output_dim=output_dim, n_gpu=n_gpu)
File "/home/DANet/abstract_model.py", line 223, in load_model
self.layer, self.virtual_batch_size = load_model['layer_num'], load_model['virtual_batch_size']
TypeError: 'DANet' object is not subscriptable
I use the checkpoint model:
Traceback (most recent call last):
File "predict.py", line 58, in
clf.load_model(filepath, input_dim=X_test.shape[1], output_dim=output_dim, n_gpu=n_gpu)
File "/home/gdu/DANet/abstract_model.py", line 223, in load_model
self.layer, self.virtual_batch_size = load_model['layer_num'], load_model['virtual_batch_size']
KeyError: 'layer_num'
I download the code+date from your github, but get mse=0.91, not 0.55.
There is some codes I debug:
(1) in data_util.py, add '.txt'
def svm2pkl(source, save_path):
before:
X_train, y_train = load_svmlight_file(os.path.join(source, 'train'))
X_valid, y_valid = load_svmlight_file(os.path.join(source, 'vali'))
X_test, y_test = load_svmlight_file(os.path.join(source, 'test'))
after:
def svm2pkl(source, save_path):
X_train, y_train = load_svmlight_file(os.path.join(source, 'train.txt'))
X_valid, y_valid = load_svmlight_file(os.path.join(source, 'vali.txt'))
X_test, y_test = load_svmlight_file(os.path.join(source, 'test.txt'))
(2)in deault.py, add 'cfg.fit.weight_decay = 1e-5','cfg.fit.schedule_step = 20'.
As I do regression task, when I run main.py, the Keyerror: weight_decay ,Keyerror: schedule_step .I can't find these two parameters define in deault.py ,MSLR.yaml, main.py, so I add 'cfg.fit.weight_decay = 1e-5','cfg.fit.schedule_step = 20' in deault.py.
(3)Run codes by using python predict.py -d [dataset_name] -m [model_file_path] -g [gpu_id]
where the best.pth path is already specified. I don't get the mean: Replace the resume_dir
path with the file path containing your trained model/weight. Does it mean set the resume_dir path to the best.pth path?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.