Skip to content

Commit

Permalink
hduva doc
Browse files Browse the repository at this point in the history
  • Loading branch information
smilesun committed Jan 6, 2024
1 parent 5e4e672 commit a5f3817
Show file tree
Hide file tree
Showing 189 changed files with 7,070 additions and 2,207 deletions.
2 changes: 1 addition & 1 deletion docs/build/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 48d0245515a1ca80bc37c0931e40c20f
config: 84bc96467903e48216c9956d05985a38
tags: 645f666f9bcd5a90fca523b33c5a78b7
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- # yaml demo document

te_d: caltech
tpath: examples/tasks/task_vlcs.py
bs: 2
model: diva
debug: True
gamma_y: 700000.0 #7e5
gamma_d: 100000.0 #1e5
nname: alexnet
nname_dom: conv_bn_pool_2
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import os
from torchvision import transforms
from domainlab.tasks.task_folder_mk import mk_task_folder
from domainlab.tasks.utils_task import ImSize

# relative path is essential here since this file is used for testing, no absolute directory possible

path_this_file = os.path.dirname(os.path.realpath(__file__))
chain = mk_task_folder(extensions={"caltech": "jpg", "sun":
"jpg", "labelme": "jpg"},
list_str_y=["chair", "car"],
dict_domain_folder_name2class={
"caltech": {"auto": "car", "stuhl": "chair"},
"sun": {"vehicle": "car", "sofa": "chair"},
"labelme": {"drive": "car", "sit": "chair"}
},
dict_domain_img_trans={
"caltech": transforms.Compose(
[transforms.Resize((256, 256)),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(
[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
]),
"sun": transforms.Compose(
[transforms.Resize((256, 256)),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(
[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
]),
"labelme": transforms.Compose(
[transforms.Resize((256, 256)),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(
[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])
]),
},
img_trans_te=transforms.Compose(
[transforms.Resize((256, 256)),
transforms.CenterCrop(224),
transforms.ToTensor(),
transforms.Normalize(
[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])]),
isize=ImSize(3, 224, 224),
dict_domain2imgroot={
"caltech": os.path.join(
path_this_file,
"../../data/vlcs_mini/caltech/"),
"sun": os.path.join(
path_this_file,
"../../data/vlcs_mini/sun/"),
"labelme": os.path.join(
path_this_file,
"../../data/vlcs_mini/labelme/")},
taskna="e_mini_vlcs")


def get_task(na=None):
return chain
14 changes: 7 additions & 7 deletions docs/build/html/_modules/domainlab/algos/a_algo_builder.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


<title>domainlab.algos.a_algo_builder &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=92fd9be5" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
Expand Down Expand Up @@ -104,7 +104,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -162,17 +162,17 @@

<li class="md-tabs__item"><a href="../../../doc_tasks.html" class="md-tabs__link">Task Specification</a></li>

<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Custom Neural Network</a></li>
<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Specify neural network in commandline</a></li>

<li class="md-tabs__item"><a href="../../../doc_MNIST_classification.html" class="md-tabs__link">Examples with MNIST</a></li>

<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">Examples by algorithm</a></li>
<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">More commandline examples</a></li>

<li class="md-tabs__item"><a href="../../../doc_benchmark.html" class="md-tabs__link">Benchmarks</a></li>

<li class="md-tabs__item"><a href="../../../doc_output.html" class="md-tabs__link">Output Structure</a></li>

<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Extend and Contribute</a></li>
<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Specify custom model in commandline</a></li>
<li class="md-tabs__item"><a href="../../index.html" class="md-tabs__link">Module code</a></li>
</ul>
</div>
Expand Down Expand Up @@ -375,11 +375,11 @@ <h1 id="modules-domainlab-algos-a-algo-builder--page-root">Source code for domai
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
&#169; Copyright 2021-2023, Marr Lab..
&#169; Copyright 2021-2024, Marr Lab..

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
14 changes: 7 additions & 7 deletions docs/build/html/_modules/domainlab/algos/builder_api_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


<title>domainlab.algos.builder_api_model &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=92fd9be5" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
Expand Down Expand Up @@ -104,7 +104,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -162,17 +162,17 @@

<li class="md-tabs__item"><a href="../../../doc_tasks.html" class="md-tabs__link">Task Specification</a></li>

<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Custom Neural Network</a></li>
<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Specify neural network in commandline</a></li>

<li class="md-tabs__item"><a href="../../../doc_MNIST_classification.html" class="md-tabs__link">Examples with MNIST</a></li>

<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">Examples by algorithm</a></li>
<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">More commandline examples</a></li>

<li class="md-tabs__item"><a href="../../../doc_benchmark.html" class="md-tabs__link">Benchmarks</a></li>

<li class="md-tabs__item"><a href="../../../doc_output.html" class="md-tabs__link">Output Structure</a></li>

<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Extend and Contribute</a></li>
<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Specify custom model in commandline</a></li>
<li class="md-tabs__item"><a href="../../index.html" class="md-tabs__link">Module code</a></li>
</ul>
</div>
Expand Down Expand Up @@ -340,11 +340,11 @@ <h1 id="modules-domainlab-algos-builder-api-model--page-root">Source code for do
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
&#169; Copyright 2021-2023, Marr Lab..
&#169; Copyright 2021-2024, Marr Lab..

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
14 changes: 7 additions & 7 deletions docs/build/html/_modules/domainlab/algos/builder_custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


<title>domainlab.algos.builder_custom &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=92fd9be5" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
Expand Down Expand Up @@ -104,7 +104,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -162,17 +162,17 @@

<li class="md-tabs__item"><a href="../../../doc_tasks.html" class="md-tabs__link">Task Specification</a></li>

<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Custom Neural Network</a></li>
<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Specify neural network in commandline</a></li>

<li class="md-tabs__item"><a href="../../../doc_MNIST_classification.html" class="md-tabs__link">Examples with MNIST</a></li>

<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">Examples by algorithm</a></li>
<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">More commandline examples</a></li>

<li class="md-tabs__item"><a href="../../../doc_benchmark.html" class="md-tabs__link">Benchmarks</a></li>

<li class="md-tabs__item"><a href="../../../doc_output.html" class="md-tabs__link">Output Structure</a></li>

<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Extend and Contribute</a></li>
<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Specify custom model in commandline</a></li>
<li class="md-tabs__item"><a href="../../index.html" class="md-tabs__link">Module code</a></li>
</ul>
</div>
Expand Down Expand Up @@ -416,11 +416,11 @@ <h1 id="modules-domainlab-algos-builder-custom--page-root">Source code for domai
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
&#169; Copyright 2021-2023, Marr Lab..
&#169; Copyright 2021-2024, Marr Lab..

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
16 changes: 8 additions & 8 deletions docs/build/html/_modules/domainlab/algos/builder_dann.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@


<title>domainlab.algos.builder_dann &#8212; domainlab documentation</title>
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=80d5e7a1" />
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=92fd9be5" />
<link rel="stylesheet" type="text/css" href="../../../_static/material.css?v=79c92029" />
<script src="../../../_static/documentation_options.js?v=5929fcd5"></script>
<script src="../../../_static/doctools.js?v=888ff710"></script>
Expand Down Expand Up @@ -104,7 +104,7 @@
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../../../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder=""Search""
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
Expand Down Expand Up @@ -162,17 +162,17 @@

<li class="md-tabs__item"><a href="../../../doc_tasks.html" class="md-tabs__link">Task Specification</a></li>

<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Custom Neural Network</a></li>
<li class="md-tabs__item"><a href="../../../doc_custom_nn.html" class="md-tabs__link">Specify neural network in commandline</a></li>

<li class="md-tabs__item"><a href="../../../doc_MNIST_classification.html" class="md-tabs__link">Examples with MNIST</a></li>

<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">Examples by algorithm</a></li>
<li class="md-tabs__item"><a href="../../../doc_examples.html" class="md-tabs__link">More commandline examples</a></li>

<li class="md-tabs__item"><a href="../../../doc_benchmark.html" class="md-tabs__link">Benchmarks</a></li>

<li class="md-tabs__item"><a href="../../../doc_output.html" class="md-tabs__link">Output Structure</a></li>

<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Extend and Contribute</a></li>
<li class="md-tabs__item"><a href="../../../doc_extend_contribute.html" class="md-tabs__link">Specify custom model in commandline</a></li>
<li class="md-tabs__item"><a href="../../index.html" class="md-tabs__link">Module code</a></li>
</ul>
</div>
Expand Down Expand Up @@ -359,7 +359,7 @@ <h1 id="modules-domainlab-algos-builder-dann--page-root">Source code for domainl
trainer.init_business(model, task, observer, device, args)
if trainer.name == "hyperscheduler":
trainer.set_scheduler(HyperSchedulerWarmupExponential,
total_steps=trainer.num_batches*args.epos,
total_steps=trainer.num_batches*args.warmup,
flag_update_epoch=False,
flag_update_batch=True)
return trainer, model, observer, device</div>
Expand All @@ -385,11 +385,11 @@ <h1 id="modules-domainlab-algos-builder-dann--page-root">Source code for domainl
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
&#169; Copyright 2021-2023, Marr Lab..
&#169; Copyright 2021-2024, Marr Lab..

</div>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.6.
<a href="http://www.sphinx-doc.org/">Sphinx</a> 7.2.2.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
Expand Down
Loading

0 comments on commit a5f3817

Please sign in to comment.