Unverified Commit e9b624fe authored by Minjie Wang's avatar Minjie Wang Committed by GitHub
Browse files

Merge branch 'master' into dist_part

parents 8086d1ed a88e7f7e
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
python Smooth_AP/src/evaluate_model.py \
--dataset Inaturalist \
--bs 384 \
--source_path ~/code/Smooth_AP/data/ --embed_dim 128 \
--resume $CHECKPOINT_PATH \
--class_num 948 --loss smoothap \
--trainset lin_train_set1.txt \
--testset Inaturalist_test_set1.txt \
--linsize 29011 --uinsize 18403
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -121,6 +121,7 @@ def main(args): ...@@ -121,6 +121,7 @@ def main(args):
ns_mode=True) ns_mode=True)
labels = labels.to(device) labels = labels.to(device)
model = model.to(device) model = model.to(device)
inv_target = inv_target.to(device)
optimizer = th.optim.Adam(model.parameters(), lr=1e-2, weight_decay=args.wd) optimizer = th.optim.Adam(model.parameters(), lr=1e-2, weight_decay=args.wd)
......
...@@ -60,6 +60,7 @@ def run(proc_id, n_gpus, n_cpus, args, devices, dataset, queue=None): ...@@ -60,6 +60,7 @@ def run(proc_id, n_gpus, n_cpus, args, devices, dataset, queue=None):
ns_mode=True) ns_mode=True)
labels = labels.to(device) labels = labels.to(device)
model = model.to(device) model = model.to(device)
inv_target = inv_target.to(device)
model = DistributedDataParallel(model, device_ids=[dev_id], output_device=dev_id) model = DistributedDataParallel(model, device_ids=[dev_id], output_device=dev_id)
optimizer = th.optim.Adam(model.parameters(), lr=1e-2, weight_decay=args.wd) optimizer = th.optim.Adam(model.parameters(), lr=1e-2, weight_decay=args.wd)
......
...@@ -273,19 +273,19 @@ class COO : public GraphInterface { ...@@ -273,19 +273,19 @@ class COO : public GraphInterface {
// TODO(da): add constructor for creating COO from shared memory // TODO(da): add constructor for creating COO from shared memory
void AddVertices(uint64_t num_vertices) override { void AddVertices(uint64_t num_vertices) override {
LOG(FATAL) << "CSR graph does not allow mutation."; LOG(FATAL) << "COO graph does not allow mutation.";
} }
void AddEdge(dgl_id_t src, dgl_id_t dst) override { void AddEdge(dgl_id_t src, dgl_id_t dst) override {
LOG(FATAL) << "CSR graph does not allow mutation."; LOG(FATAL) << "COO graph does not allow mutation.";
} }
void AddEdges(IdArray src_ids, IdArray dst_ids) override { void AddEdges(IdArray src_ids, IdArray dst_ids) override {
LOG(FATAL) << "CSR graph does not allow mutation."; LOG(FATAL) << "COO graph does not allow mutation.";
} }
void Clear() override { void Clear() override {
LOG(FATAL) << "CSR graph does not allow mutation."; LOG(FATAL) << "COO graph does not allow mutation.";
} }
DLContext Context() const override { DLContext Context() const override {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment