repo
stringlengths
8
116
tasks
stringlengths
8
117
titles
stringlengths
17
302
dependencies
stringlengths
5
372k
readme
stringlengths
5
4.26k
__index_level_0__
int64
0
4.36k
dgriffiths3/ml_segmentation
['denoising', 'semantic segmentation']
['Anatomical Priors for Image Segmentation via Post-Processing with Denoising Autoencoders']
evaluation.py inference.py train.py main seg_binary seg_multi_class infer_images main compute_prediction parse_args create_features check_args train_model read_data create_training_dataset subsample create_binary_pattern test_model subsample_idx create_features main parse_args harlick_features calc_haralick check_args update join glob print extend ProgressBar start imread enumerate len update join glob print float extend ProgressBar start finish imread enumerate len ground_truth_images multi_class time seg_binary print float add_argument seg_multi_class ArgumentParser parse_args test_images add_argument ArgumentParser cvtColor COLOR_BGR2GRAY int copyMakeBorder reshape sqrt create_features predict load join basename imwrite glob print compute_prediction open imread len infer_images join print glob append imread randint mean haralick update as_strided print reshape ProgressBar strides start append calc_haralick enumerate print local_binary_pattern int reshape subsample_idx hstack zeros harlick_features create_binary_pattern COLOR_BGR2GRAY print reshape enumerate append train_test_split ravel array create_features cvtColor len print score SVC GradientBoostingClassifier RandomForestClassifier fit print recall_score precision_score f1_score accuracy_score predict train_model dump read_data create_training_dataset test_model open
# Machine Learning - Image Segmentation Per pixel image segmentation using machine learning algorithms. Programmed using the following libraries: Scikit-Learn, Scikit-Image OpenCV, and Mahotas and ProgressBar. Compatible with Python 2.7+ and 3.X. ### Feature vector Spectral: * Red * Green * Blue Texture: * Local binary pattern Haralick (Co-occurance matrix) features (Also texture):
1,900
dgromann/OntologyAlignmentWithEmbeddings
['word embeddings', 'multilingual word embeddings']
['Comparing Pretrained Multilingual Word Embeddings on an Ontology Alignment Task']
OntAlignEmbeddings/polyglotEmbeddings.py OntAlignEmbeddings/ontologyAlignment_ByEmbeddings.py OntAlignEmbeddings/normalizer.py OntAlignEmbeddings/word2vecEmbeddings.py OntAlignEmbeddings/parseInput/parseIndustryClassifications.py setup.py OntAlignEmbeddings/fastTextEmbeddings.py OntAlignEmbeddings/semSim.py getFastTextEmbeddingFromExternal getWords getEmbedding normalize getFastTextEmbeddingDict normalize case_normalizer alignAllLanguages replaceGermanCompounds loadData getResults getWords getWord2VecAlignment main getAlignment getEmbeddingAlignment getPolyglotEmbeddingDict getEmbedding nth_root jaccard_similarity l2norm square_rooted l2norm_old readEvalFile getEditDistance cosine_similarity minkowski_distance JSD getJensenShanon getWord2VecModel getW2VEmbeddingFromExternal wordVector getWords getEmbedding getW2VEmbedDict normalize main loadICB loadGICS store join strip replace split lemmatize upper lower title sub vocab normalize load_word2vec_format items list write close getWords getEmbedding load_word2vec_format open sort case_normalizer int str print strip write close open round split join list items replace split items list cosine_similarity replace print readEvalFile getWords append zeros max len items getWord2VecModel list cosine_similarity replace print wordVector readEvalFile getWords append zeros max len str print linear_sum_assignment write getResults close zip matrix open str list items print write close Counter getResults append most_common max open load open alignAllLanguages replaceGermanCompounds loadData getW2VEmbedDict getAlignment getEmbeddingAlignment items list print write getWords getEmbedding open items list print array append zeros JSD len norm sum square_rooted sqrt sum set abs sqrt sum float union intersection len jaccard_similarity items list readEvalFile append zeros len int list strip close open append split load_word2vec_format load items list write getWords getEmbedding open load_word2vec_format init_sims replace iterrows parse replace dict ExcelFile findall iterrows parse replace dict ExcelFile dump open loadICB loadGICS store
# OntologyAlignmentWithEmbeddings This project has been created for an LREC 2018 paper to align labels of two lightweight ontologies (industry classification systems) in four languages (en, de, it, es) using pre-trained embedding libraries. We were interested in seeing whether good results can be achieved with using already existing embeddings. It turned out that for our domain-specific multilingual scenario fastText provided the most successful results. For detailed results please consult our LREC 2018 paper. ## Embedding repositories The pretrained embeddings utilized in this project were retrieved from the following repositories. * [word2vec](https://github.com/Kyubyong/wordvectors) * [polyglot](https://sites.google.com/site/rmyeid/projects/polyglot) * [fastText](https://github.com/facebookresearch/fastText/blob/master/pretrained-vectors.md) ## Dependencies * gensim version 3.0.0 * numpy version 1.13.3
1,901
dheeraj7596/SCDV
['information retrieval', 'text classification', 'multi label classification']
['SCDV : Sparse Composite Document Vectors using soft clustering over distributional representations']
Reuters/KaggleWord2VecUtility.py Reuters/SCDV.py IR/SCDV.py IR/Word2Vec.py 20news/TopicCoherence.py 20news/tsne_20news.py Reuters/reuters.py 20news/SCDV.py Reuters/metrics.py Reuters/create_data.py 20news/KaggleWord2VecUtility.py 20news/FastText.py IR/FastText.py Reuters/Word2Vec.py 20news/create_tsv.py 20news/Word2Vec.py Reuters/FastText.py KaggleWord2VecUtility get_probability_word_vectors drange cluster_GMM read_GMM create_cluster_vector_and_gwbowv drange get_topic_document_prob_map cluster_GMM read_GMM get_probability_topic_vectors get_doccofrequency get_probability_words get_coherence create_cluster_vector_and_gwbowv get_pmi x2p pca Hbeta tsne get_probability_word_vectors drange create_document_vectors cluster_GMM read_GMM create_cluster_vector_and_gwbowv KaggleWord2VecUtility drange get_minibatch _not_in_sphinx ReutersParser ReutersStreamReader get_probability_word_vectors drange cluster_GMM read_GMM create_cluster_vector_and_gwbowv dump print predict_proba GaussianMixture predict fit load print zeros range zeros sqrt einsum GMM fit_predict print split print list split set print range print log Counter most_common range print log Counter most_common range range len sum exp log T Hbeta inf print ones square copy add range shape zeros sum log T print eig mean shape dot tile x2p T isinstance randn print ones transpose maximum square add mean shape log real tile zeros sum range list keys concatenate read_GMM cpu_count strip create_cluster_vector_and_gwbowv save abs max open vectors str list get_probability_word_vectors transpose index2word shape append fit_transform range dump cluster_GMM readlines close zip listdir load int time read get_feature_names items join print idf_ write dict TfidfVectorizer dot split zeros len
# Text Classification with Sparse Composite Document Vectors (SCDV) ## Introduction - For text classification and information retrieval tasks, text data has to be represented as a fixed dimension vector. - We propose simple feature construction technique named [**SCDV: Sparse Composite Document Vectors using soft clustering over distributional representations.**](https://www.aclweb.org/anthology/D17-1069.pdf) presented at EMNLP 2017. - We demonstrate our method through experiments on multi-class classification on 20newsgroup dataset and multi-label text classification on Reuters-21578 dataset. ## Citation If you find SCDV useful in your research, please consider citing: ``` @inproceedings{mekala2017scdv, title={SCDV: Sparse Composite Document Vectors using soft clustering over distributional representations},
1,902
dheerajsingh7351/facedetect
['face detection', 'face alignment']
['Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Networks']
facedetect.py draw_boxes draw_faces show items list Circle axis add_patch imshow Rectangle gca imread show deepcopy subplot list items axis imshow gca imread range len
# Face Detection with Deep Learning(MTCNN) There are multiple methods for face detection and face landmark localization. Multi-Task Cascaded Convolutional Neural Network or MTCNN in short is one such method and is based on the paper titled “Joint Face Detection and Alignment Using Multitask Cascaded Convolutional Networks.” (https://arxiv.org/abs/1604.02878) The network uses a cascade structure with three networks; first the image is rescaled to a range of different sizes (called an image pyramid), then the first model (Proposal Network or P-Net) proposes candidate facial regions, the second model (Refine Network or R-Net) filters the bounding boxes, and the third model (Output Network or O-Net) proposes facial landmarks The model is called a multi-task network because each of the three models in the cascade (P-Net, R-Net and O-Net) are trained on three tasks, e.g. make three types of predictions; they are: face classification, bounding box regression, and facial landmark localization. Open source implementations of the architecture that can be trained on new datasets, as well as pre-trained models that can be used directly for face detection. ### Installations 1. Download and install python : https://www.python.org/downloads/ Make sure to add python to path
1,903
dhgrs/chainer-ClariNet
['speech synthesis']
['ClariNet: Parallel Wave Generation in End-to-End Text-to-Speech']
AutoregressiveWaveNet/WaveNet/__init__.py StudentGaussianIAF/params.py StudentGaussianIAF/teacher_params.py StudentGaussianIAF/generate.py AutoregressiveWaveNet/utils.py AutoregressiveWaveNet/params.py AutoregressiveWaveNet/generate.py AutoregressiveWaveNet/net.py AutoregressiveWaveNet/WaveNet/modules.py StudentGaussianIAF/WaveNet/__init__.py StudentGaussianIAF/train.py StudentGaussianIAF/WaveNet/modules.py StudentGaussianIAF/utils.py AutoregressiveWaveNet/train.py StudentGaussianIAF/net.py EncoderDecoderModel UpsampleNet Preprocess get_VCTK_paths get_LJSpeech_paths WaveNet ResidualBlock ResidualNet DistilModel UpsampleNet STFT Preprocess get_VCTK_paths get_LJSpeech_paths WaveNet ResidualBlock ParallelWaveNet ResidualNet sorted joinpath sorted
# chainer-ClariNet A Chainer implementation of ClariNet( https://arxiv.org/abs/1807.07281 ). # Results ## Autoregressive WaveNet(Single Gaussian ver.) trained with VCTK Corpus https://nana-music.com/sounds/04027269/ ## Student Gaussian IAF trained with LJ-Speech https://nana-music.com/sounds/043ba7b4/
1,904
dhlab-epfl/dhSegment-text
['document layout analysis', 'semantic segmentation']
['Combining Visual and Textual Features for Semantic Segmentation of Historical Newspapers']
dh_segment_text/network/pretrained_models/resnet50/encoder.py dh_segment_text/post_processing/line_vectorization.py exps/diva/utils.py exps/page/process.py exps/Cini/cini_post_processing.py dh_segment_text/utils/evaluation.py exps/_misc/worker.py exps/_misc/post_process_evaluation.py dh_segment_text/embeddings/pca_encoder.py exps/cbad/__init__.py exps/diva/evaluation.py exps/Ornaments/ornaments_process_eval.py exps/page/evaluation.py dh_segment_text/embeddings/__init__.py dh_segment_text/post_processing/polygon_detection.py dh_segment_text/network/pretrained_models/vgg16.py exps/Cini/cini_process_set.py doc/conf.py exps/DIBCO/dibco_evaluation.py exps/_misc/layout_generate_dataset.py exps/page/__init__.py dh_segment_text/embeddings/embeddings_utils.py exps/cbad/process.py exps/Cini/cini_evaluation.py dh_segment_text/network/pretrained_models/mobilenet/conv_blocks.py dh_segment_text/utils/misc.py dh_segment_text/embeddings/conv2d_encoder.py dh_segment_text/network/pretrained_models/resnet50/resnet_v1.py dh_segment_text/utils/__init__.py exps/cbad/evaluation.py dh_segment_text/inference/loader.py exps/cbad/utils.py dh_segment_text/io/PAGE.py dh_segment_text/network/pretrained_models/resnet50/resnet_utils.py dh_segment_text/network/model.py dh_segment_text/post_processing/__init__.py dh_segment_text/utils/params_config.py dh_segment_text/estimator_fn.py dh_segment_text/network/simple_decoder.py dh_segment_text/network/pretrained_models/mobilenet/mobilenet.py exps/Ornaments/ornaments_dataset_generator.py exps/DIBCO/dibco_dataset_generator.py exps/page/utils.py exps/diva/process.py dh_segment_text/network/pretrained_models/__init__.py exps/DIBCO/dibco_post_processing.py dh_segment_text/network/__init__.py dh_segment_train.py dh_segment_text/embeddings/conv1d_encoder.py dh_segment_text/io/via.py dh_segment_text/post_processing/boxes_detection.py dh_segment_text/io/input.py dh_segment_text/utils/labels.py dh_segment_text/inference/__init__.py dh_segment_text/io/input_utils.py dh_segment_text/post_processing/binarization.py exps/Ornaments/ornaments_process_set.py exps/diva/__init__.py demo.py dh_segment_text/__init__.py exps/Ornaments/ornaments_post_processing.py dh_segment_text/network/pretrained_models/mobilenet/encoder.py exps/__init__.py setup.py dh_segment_text/io/__init__.py dh_segment_text/network/pretrained_models/mobilenet/mobilenet_v2.py exps/Ornaments/ornaments_evaluation.py dh_segment_text/embeddings/encoder.py page_make_binary_mask format_quad_to_string run default_config model_fn Conv1dEncoder Conv2dEncoder batch_resize_maps batch_gather batch_resize_and_gather EmbeddingsEncoder PCAEncoder _signature_def_to_tensors LoadedModel input_fn serving_input_filename serving_input_image InputCase rotate_crop data_augmentation_fn local_entropy load_and_resize_image load_embeddings extract_patches_fn resize_image json_serialize get_unique_tags_from_xml_text_regions TextRegion Border Point Page TableRegion Region _get_text_equiv SeparatorRegion GroupSegment save_baselines TextLine Metadata parse_file _try_to_int GraphicRegion Text BaseElement create_masks get_via_attributes _draw_mask convert_via_region_page_text_region load_annotation_data export_annotation_dict create_via_annotation_single_image _get_xywh_from_coordinates _compute_reduced_dimensions get_annotations_per_file _collect_working_items_from_local_images create_via_region_from_coordinates _collect_working_items_from_iiif collect_working_items _scale_down_original parse_via_attributes _write_mask _get_coordinates_from_xywh Decoder Encoder _get_image_shape_tensor SimpleDecoder _upsample_concat mean_substraction VGG16 expand_input_by_factor _v1_compatible_scope_naming _fixed_padding split_separable_conv2d expanded_conv _make_divisible split_conv _split_divisible MobileNetV2 mobilenet depth_multiplier _scope_all safe_arg_scope _fixed_padding apply_activation op _set_arg_scope_defaults _make_divisible NoOpScope mobilenet_base global_pool training_scope mobilenet mobilenet_base wrapped_partial training_scope ResnetV1_50 Block conv2d_same subsample resnet_arg_scope stack_blocks_dense resnet_v1_152 resnet_v1_101 bottleneck resnet_v1_200 resnet_v1_50 resnet_v1 resnet_v1_block cleaning_probs hysteresis_thresholding cleaning_binary thresholding find_boxes find_lines find_polygonal_regions Metrics intersection_over_union class_to_label_image get_n_classes_from_file label_image_to_class multiclass_to_label_image multilabel_image_to_class get_classes_color_from_file_multilabel get_n_classes_from_file_multilabel get_classes_color_from_file dump_json load_pickle shuffled get_class_from_name hash_dict dump_pickle get_data_folder download_file parse_json PredictionType EmbeddingsParams BaseParams ModelParams TrainingParams eval_fn parse_score_txt extract_lines prediction_fn cbad_post_processing_fn vertical_local_maxima remove_borders line_extraction_v1 get_image_label_basename save_and_resize draw_lines_fn annotate_one_page cbad_set_generator get_page_filename cini_evaluate_folder cini_post_processing_fn find_elements predict_on_set generate_one_tuple get_gt_filename get_exported_image_basename get_img_filenames dibco_evaluate_folder dibco_binarization_fn eval_fn prediction_fn diva_post_processing_fn parse_diva_tool_output diva_dataset_generator to_original_color_code generate_set ornament_evaluate_folder ornaments_post_processing_fn find_ornament predict_on_set eval_fn extract_page format_quad_to_string prediction_fn page_post_processing_fn make_binary_mask get_coords_form_txt_line page_dataset_generator convert_array_masks save_and_resize save_cmap_to_txt process_one make_cmap _hash_dict evaluate_one_model cleaning_binary thresholding get_n_classes_from_file CLASSIFICATION to_dict get_n_classes_from_file_multilabel input_fn BestExporter cpu_count set_random_seed evaluate_every_epoch export from_dict str model_fn Estimator get_dirs_or_files replace input_resized_size n_epochs trange ConfigProto join evaluate serving_input_filename min train makedirs trainable_variables get_regularization_loss Saver pretrained_information exponential_decay argmax from_dict training_margin name pad encoder encoder_class get_encoder get_or_create_global_step one_hot squared_difference ModelParams softmax cosine_restart_learning learning_rate decoder exponential_learning cosine_decay_restarts AdamWOptimizer PredictOutput dict AdamOptimizer get_decoder decoder_class embeddings_encoder_class histogram adamw_optimizer scalar EmbeddingsParams get_default_graph from_dict join basename list fillna isdir isinstance glob INPUT_CSV splitext INPUT_DIR append read_csv values INPUT_LIST one_hot transpose reduce_max reduce_sum conv2d pow set_shape int32 assert_has_rank py_func set_shape py_func isinstance find from_xml parse find ndarray isinstance tolist copy to_dict scale_baseline_points Page write_to_file TextRegion list parse_file text_regions custom_attribute findall append items list print issubset set append VIAttribute keys filterfalse list keys int _formatting join list items tqdm WorkingItem append _get_image_shape_without_loading get items list basename replace tqdm raise_for_status append Session WorkingItem items list copy append values join _getimage_from_iiif uint8 imsave astype iiif image_name resize collection makedirs items list all from_iterable unique append VIAttribute values polylines reshape join uint8 astype imsave makedirs options join list format uint8 _draw_mask print tqdm dict lower append zeros resize_and_write_mask append list array stack min max list _get_xywh_from_coordinates getsize basename format annotations Page _get_coordinates_from_xywh pad int max append range identity conv2d zip append _split_divisible enumerate split items list hasattr _make_divisible pop get deepcopy get as_list as_list pool_op convert_to_tensor set_shape xavier_initializer truncated_normal_initializer deepcopy partial update_wrapper pad enumerate uint8 threshold THRESH_OTSU THRESH_BINARY GaussianBlur uint8 morphologyEx astype MORPH_CLOSE MORPH_OPEN ones label zeros unique approxPolyDP query vstack boundingRect list sorted RETR_EXTERNAL append minAreaRect format validate_box findContours KDTree int0 CHAIN_APPROX_SIMPLE print boxPoints arcLength convexHull array len get_connections T defaultdict list find_costs euclidean_distances print skimage_label shape stack unravel_index skeletonize MakeLineMCP append argmax values list sorted CHAIN_APPROX_SIMPLE print Polygon findContours RETR_EXTERNAL append zeros uint8 astype int8 get_classes_color_from_file get_classes_color_from_file get_classes_color_from_file_multilabel zeros get_classes_color_from_file_multilabel int32 zip astype float32 astype float32 seed shuffle copy rsplit import_module getattr join expanduser makedirs join extract_lines list basename format decode parse_score_txt glob print parse_file tqdm splitlines append float join sort_values to_csv splitlines rename reindex next read_csv StringIO glob join makedirs dump_pickle line_extraction_v1 cleaning_probs append find_lines hysteresis_thresholding uint8 zeros_like ones morphologyEx astype MORPH_CLOSE ones label copy load join format imresize line_extraction_v1 save_baselines shape imread imsave makedirs split sqrt float imsave resize join get_image_label_basename format zeros_like save_and_resize polylines parse_file circle copy imread get_page_filename join format glob tqdm stack savetxt annotate_one_page makedirs join format image_filename parse_file draw_baselines imsave load_pickle polylines DataFrame intersection_over_union append imread sort_values imsave format replace cini_post_processing_fn imresize glob astype join print float32 to_csv makedirs RETR_TREE uint8 sorted get_cleaned_prediction zeros_like CHAIN_APPROX_SIMPLE concatenate ones findContours astype fillConvexPoly dump_pickle int32 erode minAreaRect argmax load join cini_post_processing_fn tqdm imread makedirs int abspath int split split join format get_exported_image_basename zeros_like imread imsave precision compute_psnr resize Metrics max compute_mse imread imsave format glob compare_bin_prediction_to_label f_measure PSNR recall join uint8 print compute_prf zeros makedirs uint8 threshold astype THRESH_OTSU THRESH_BINARY GaussianBlur imsave mean connectedComponents uint8 threshold format zeros_like imsave astype THRESH_OTSU THRESH_BINARY unique GaussianBlur range process_hlp_fn splitlines split items list zeros_like join format glob annotate_one tqdm imread imsave join format tqdm stack savetxt abspath imread imsave makedirs compute_miou polylines precision resize Metrics max compute_accuracy imread imsave format glob mIOU f_measure recall join uint8 print find_box maximum compute_prf tqdm accuracy makedirs uint8 threshold format morphologyEx THRESH_OTSU THRESH_BINARY astype MORPH_CLOSE GaussianBlur imsave MORPH_OPEN load compute_miou extract_page mIOU shape intersection_over_union Metrics imread max format imsave cleaning_binary thresholding find_boxes uint8 page_post_processing_fn reshape array split join get_coords_form_txt_line uint8 basename format fillPoly open zeros imread imsave split join get_coords_form_txt_line format fillPoly tqdm stack savetxt open zeros imread imsave makedirs join format zeros_like convert_array_masks save_and_resize fillPoly parse_file copy dstack graphic_regions imread uint8 astype concatenate zeros int32 enumerate savetxt concatenate join format glob print sort _hash_dict tqdm dict makedirs
# dhSegment text This a fork of the original [dhSegment repository](https://github.com/dhlab-epfl/dhSegment), developed to carry out experiments on combining visual and textual features published in the paper **Combining Visual and Textual Features for Semantic Segmentation of Historical Newspapers** (see reference below). ## 1. Modifications Compared to the original dhSegment repository, the following modifications were made: - Change of the input pipeline to read embeddings; - Creation of embeddings maps with several dimensionality reduction algorithms; - Concatenation of the embeddings map inside the encoder or decoder. ## 2. Usage For general usage of dhSegment, see the [original documentation](https://dhsegment.readthedocs.io/). - The csv file now needs four columns: image, label, embeddings, embeddings_map.
1,905
dhlab-epfl/dhSegment-text-torch
['document layout analysis', 'semantic segmentation']
['Combining Visual and Textual Features for Semantic Segmentation of Historical Newspapers']
dh_segment_text/models/decoders/unet.py dh_segment_text/models/encoders/resnet.py dh_segment_text/models/text_segmentation_model.py dh_segment_text/__init__.py dh_segment_text/models/utils.py dh_segment_text/data/text_dataloader.py dh_segment_text/models/embeddings_encoder/noop_encoder.py dh_segment_text/data/image_text_dataset.py dh_segment_text/models/text_module.py setup.py dh_segment_text/data/text_dataset.py dh_segment_text/models/__init__.py dh_segment_text/models/embeddings_encoder/embeddings_encoder.py dh_segment_text/data/__init__.py ImageTextDataset compute_embeddings_paddings TextDataLoader collate_fn load_data_from_csv TextDataset check_dirs_exist load_data_from_csv_list compose_input_data get_image_exts sample_to_tensor load_data_from_folder load_sample TextModule TextSegmentationModel conv2d_extra_params TextUnetDecoder EmbeddingsEncoder NoOpEncoder TextResnetEncoder max compute_embeddings_paddings pad zip compute_paddings tensor to array append append list read_csv join compose_input_data check_dirs_exist update COLOR_BGR2RGB astype float32 int32 imread cvtColor update transpose join list glob error extend get_image_exts warning append
# dhSegment-text-torch This repository contains an add-on to [dhSegment torch](https://github.com/dhlab-epfl/dhSegment-torch) to use it with text embeddings maps. For more details about text embeddings map, please see the following publication: ``` Barman, Raphaël, Ehrmann, Maud, Clematide, Simon, Ares Oliveira, Sofia, and Kaplan, Frédéric (2020). Combining Visual and Textual Features for Semantic Segmentation of Historical Newspapers. Journal of Data Mining and Digital Humanities. https://arxiv.org/abs/2002.06144 ``` ## Usage This repository introduces new input code for using text embeddings maps as well as new networks.
1,906
dibyaghosh/gcsl
['multi goal reinforcement learning']
['Learning to Reach Goals via Iterated Supervised Learning']
dependencies/rlutil/dictarray.py dependencies/rlutil/envs/tabular_cy/q_iteration_py.py dependencies/rlutil/envs/lqr/lqr_solver.py dependencies/rlutil/logging/log_utils.py dependencies/robel/utils/__init__.py dependencies/rlutil/envs/lqr/test.py dependencies/multiworld/core/image_env.py dependencies/robel/components/robot/dynamixel_client.py dependencies/multiworld/core/flat_goal_env.py dependencies/rlutil/envs/tabular_cy/test_q_iteration.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_door.py dependencies/robel/utils/testing/mock_sim_scene.py dependencies/robel/components/base.py experiments/gcsl_sweep.py dependencies/robel/utils/testing/mock_sim_scene_test.py dependencies/robel/components/robot/dynamixel_client_test.py dependencies/robel/components/tracking/__init__.py dependencies/rlutil/envs/baird.py dependencies/robel/utils/testing/mock_time.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_push_and_reach_env_two_pucks.py dependencies/setup.py doodad/ssh/credentials.py dependencies/robel/utils/configurable.py gcsl/envs/room_env.py dependencies/multiworld/envs/real_world/sawyer/sawyer_reaching.py dependencies/robel/dkitty/avoid.py dependencies/robel/dkitty/base_env.py dependencies/multiworld/envs/pygame/point2d.py doodad/mode.py dependencies/robel/utils/plotting.py dependencies/robel/robot_env_test.py dependencies/robel/components/tracking/vr_tracker.py gcsl/envs/lunar_lander_base.py dependencies/rlutil/logging/log_processor.py dependencies/multiworld/envs/mujoco/util/create_xml.py dependencies/robel/robot_env.py dependencies/robel/dclaw/turn_test.py gcsl/algo/networks.py scripts/run_experiment_lite_doodad.py dependencies/robel/components/tracking/group_config.py dependencies/multiworld/envs/gridworlds/goal_gridworld.py dependencies/rlutil/envs/tabular/simple_env.py dependencies/robel/components/tracking/virtual_reality/poses.py dependencies/robel/components/robot/group_config_test.py doodad/arg_parse.py dependencies/multiworld/core/multitask_env.py dependencies/room_world/model_builder.py setup.py dependencies/robel/components/robot/hardware_robot_test.py dependencies/robel/dkitty/walk.py gcsl/envs/sawyer_push.py dependencies/rlutil/envs/gridcraft/true_qvalues.py dependencies/rlutil/envs/gridcraft/mazes.py dependencies/rlutil/logging/hyperparameterized.py dependencies/rlutil/hyper_sweep.py gcsl/envs/sawyer_door.py dependencies/multiworld/envs/mujoco/sawyer_xyz/base.py dependencies/rlutil/envs/tabular_cy/test_mountaincar.py gcsl/algo/gcsl.py dependencies/robel/simulation/sim_scene.py dependencies/robel/utils/math_utils.py dependencies/multiworld/envs/pygame/__init__.py dependencies/multiworld/envs/mujoco/__init__.py dependencies/robel/simulation/randomize.py dependencies/robel/dclaw/pose_test.py dependencies/rlutil/viskit/ext.py doodad/launch_tools.py dependencies/rlutil/envs/tabular_cy/test_env_wrapper.py experiments/gcsl_docker.py gcsl/algo/variants.py dependencies/robel/dkitty/utils/__init__.py dependencies/multiworld/__init__.py dependencies/robel/components/robot/dynamixel_utils.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_reach.py dependencies/rlutil/envs/gridcraft/grid_env.py dependencies/robel/dkitty/stand_test.py doodad/easy_sweep/hyper_sweep.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_push_nips.py dependencies/robel/simulation/dm_renderer.py dependencies/robel/dkitty/orient.py dependencies/robel/dclaw/screw.py dependencies/robel/dkitty/__init__.py dependencies/rlutil/viskit/core.py dependencies/room_world/pointmass.py dependencies/rlutil/serializable.py dependencies/rlutil/envs/__init__.py dependencies/rlutil/envs/gridcraft/utils.py dependencies/robel/components/tracking/phasespace_tracker.py dependencies/robel/scripts/enjoy_mjrl.py gcsl/envs/env_utils.py dependencies/rlutil/logging/autoargs.py dependencies/robel/components/base_test.py dependencies/robel/components/builder.py dependencies/rlutil/general.py dependencies/robel/dclaw/screw_test.py dependencies/multiworld/envs/mujoco/classic_mujoco/half_cheetah.py dependencies/rlutil/viskit/frontend.py dependencies/robel/scripts/check_mujoco_deps.py dependencies/rlutil/envs/wrappers.py dependencies/rlutil/logging/console.py dependencies/rlutil/envs/tabular_cy/test_random_env.py dependencies/rlutil/torch/nn.py dependencies/robel/components/tracking/virtual_reality/__init__.py doodad/easy_sweep/launcher.py dependencies/robel/dkitty/utils/manual_reset.py dependencies/robel/simulation/__init__.py dependencies/robel/components/tracking/hardware_tracker.py dependencies/robel/simulation/mjpy_renderer.py dependencies/rlutil/envs/gridcraft/test_grid_env.py dependencies/robel/components/robot/group_config.py dependencies/multiworld/envs/pygame/walls.py doodad/mount.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_push_multiobj.py doodad/easy_sweep/__init__.py dependencies/robel/dclaw/base_env.py dependencies/robel/components/tracking/utils/coordinate_system.py dependencies/room_world/room_env.py dependencies/robel/utils/resources.py gcsl/envs/lunarlander.py doodad/ec2/credentials.py gcsl/doodad_utils.py dependencies/multiworld/envs/real_world/sawyer/sawyer_pushing.py dependencies/robel/components/robot/dynamixel_robot.py dependencies/rlutil/torch/__init__.py dependencies/robel/components/robot/builder.py gcsl/algo/buffer.py dependencies/rlutil/envs/tabular/maxent_irl.py dependencies/robel/components/robot/dynamixel_robot_test.py dependencies/rlutil/envs/test_wrapper.py dependencies/robel/scripts/__init__.py dependencies/rlutil/viskit/__init__.py dependencies/robel/simulation/renderer.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_push_multiobj_subset.py dependencies/robel/scripts/find_vr_devices.py dependencies/robel/utils/math_utils_test.py gcsl/envs/goal_env.py dependencies/multiworld/envs/gridworlds/__init__.py dependencies/rlutil/torch/test_torch.py dependencies/robel/utils/testing/mock_dynamixel_sdk_test.py dependencies/multiworld/core/gym_to_multi_env.py dependencies/multiworld/envs/env_util.py dependencies/robel/components/robot/hardware_robot.py dependencies/robel/scripts/utils.py experiments/gcsl_example.py dependencies/rlutil/envs/tabular/q_iteration.py dependencies/robel/scripts/rollout.py doodad/utils.py dependencies/robel/dclaw/__init__.py dependencies/robel/dclaw/pose.py gcsl/policy.py dependencies/robel/__init__.py dependencies/robel/components/__init__.py dependencies/rlutil/logging/tabulate.py dependencies/multiworld/envs/mujoco/cameras.py dependencies/rlutil/torch/pytorch_util.py dependencies/room_world/env_utils.py dependencies/robel/dkitty/push.py dependencies/robel/utils/registration.py dependencies/robel/components/robot/__init__.py dependencies/robel/dkitty/utils/scripted_reset.py gcsl/envs/claw_env.py dependencies/rlutil/envs/env_utils.py doodad/ec2/autoconfig.py dependencies/rlutil/envs/lqr/lqrenv.py doodad/ec2/aws_util.py dependencies/robel/components/robot/robot_test.py dependencies/multiworld/envs/mujoco/mujoco_env.py dependencies/multiworld/core/serializable.py dependencies/multiworld/envs/mujoco/util/interpolation.py dependencies/robel/components/robot/robot.py dependencies/robel/dclaw/scripted_reset.py dependencies/room_world/rooms.py dependencies/robel/utils/testing/mock_dynamixel_sdk.py dependencies/rlutil/math_utils.py dependencies/robel/dkitty/stand.py doodad/relaunch.py doodad/__init__.py gcsl/envs/gymenv_wrapper.py dependencies/robel/components/tracking/virtual_reality/client.py dependencies/robel/components/builder_test.py dependencies/robel/dclaw/turn.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_multiple_objects.py dependencies/robel/components/tracking/builder.py dependencies/robel/utils/configurable_test.py dependencies/robel/simulation/mjpy_sim_scene.py dependencies/multiworld/envs/real_world/sawyer/sawyer_door.py dependencies/multiworld/envs/pygame/pygame_viewer.py dependencies/rlutil/logging/logger.py dependencies/multiworld/core/wrapper_env.py dependencies/rlutil/logging/qval_plotter.py dependencies/robel/utils/testing/__init__.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_door_hook.py dependencies/multiworld/envs/mujoco/sawyer_xyz/sawyer_push_and_reach_env.py dependencies/rlutil/envs/gridcraft/grid_spec.py dependencies/robel/simulation/dm_sim_scene.py dependencies/robel/components/tracking/tracker.py dependencies/robel/scripts/enjoy_softlearning.py dependencies/robel/dkitty/orient_test.py dependencies/robel/dkitty/walk_test.py dependencies/multiworld/envs/mujoco/sawyer_torque/sawyer_torque_reach.py gcsl/envs/__init__.py dependencies/robel/simulation/sim_scene_test.py dependencies/robel/components/tracking/utils/__init__.py dependencies/robel/scripts/play.py dependencies/robel/components/tracking/virtual_reality/device.py dependencies/rlutil/envs/gridcraft/test_grid_env_cy.py dependencies/robel/scripts/reset_hardware.py dependencies/rlutil/envs/gridcraft/wrappers.py doodad/ssh/__init__.py dependencies/robel/utils/reset_procedure.py dependencies/rlutil/envs/tabular_cy/test_pendulum.py doodad/ec2/__init__.py dependencies/rlutil/logging/test_hyperparameterized.py dependencies/robel/utils/resources_test.py register_all_envs FlatGoalEnv GymToMultiEnv MujocoGymToMultiEnv ImageEnv normalize_image unormalize_image MultitaskEnv Serializable ProxyEnv NormalizedBoxEnv get_path_lengths concatenate_box_spaces create_stats_ordered_dict get_average_returns get_generic_path_information get_asset_full_path get_stat_in_paths GoalGridworld sawyer_pusher_camera_upright_v3 init_sawyer_camera_v1 create_sawyer_camera_init sawyer_xyz_reacher_camera_v0 init_sawyer_camera_v2 sawyer_door_env_camera_v0 sawyer_pusher_camera_upright_v2 sawyer_pusher_camera_upright_v0 sawyer_init_camera_zoomed_in sawyer_pick_and_place_camera init_sawyer_camera_v5 sawyer_pusher_camera_top_down init_sawyer_camera_v4 init_sawyer_camera_v3 sawyer_torque_reacher_camera sawyer_pick_and_place_camera_slanted_angle sawyer_pick_and_place_camera_zoomed MujocoEnv create_image_48_sawyer_push_and_reach_arena_env_v0 create_image_48_sawyer_pickup_easy_v0 create_image_48_sawyer_push_and_reach_arena_env_reset_free_v0 create_image_48_sawyer_door_hook_reset_free_v1 register_mujoco_envs create_image_48_sawyer_reach_xy_env_v1 create_image_84_sawyer_reach_xy_env_v1 HalfCheetahEnv SawyerReachTorqueEnv SawyerMocapBase SawyerXYZEnv SawyerDoorEnv SawyerDoorHookEnv zangle_to_quat quat_to_zangle MultiSawyerEnv SawyerPushAndReachXYEnv SawyerPushAndReachXYZEnv SawyerPushAndReachXYZDoublePuckEnv SawyerPushAndReachXYDoublePuckEnv SawyerTwoObjectEnv SawyerMultiobjectEnv SawyerTwoObjectEnv SawyerMultiobjectEnv SawyerPushAndReachXYEasyEnv SawyerPushAndReachXYEnv SawyerPushAndReachXYHarderEnv SawyerReachXYZEnv SawyerReachXYEnv create_root_xml find_mins_maxs create_object_xml clean_xml file_len TwoPointCSpline CSpline QuinticSpline Point2DEnv Point2DWallEnv PygameViewer LinearMapper VerticalWall HorizontalWall Segment Wall register_pygame_envs point2d_image_v0 point2d_image_fixed_goal_v0 SawyerDoorEnv SawyerPushXYEnv SawyerReachXYZEnv DictArray flatten_list TrainingIterator example_run_method Sweeper always_true chunk_filter kwargs_wrapper run_sweep_parallel run_sweep_doodad run_sweep_serial gd_momentum_optimizer categorical_log_pdf gauss_log_pdf adam_optimizer np_seed gd_optimizer split_list_by_lengths clip_sing rle Serializable Baird CustomGymEnv test_env get_inner_env RllabGymEnv get_asset_xml one_hot_to_flat flat_to_one_hot TestTimeLimitWrapper ObsWrapper Wrapper TimeLimitWrapper FixedEncodeWrapper register_envs TransitionModel GridEnv RewardFunction local_spec spec_from_sparse_locations spec_from_string GridSpec GridEnvCyTest GridEnvCyTest load_qvals hash_env dense_tabular_solver plot_qval QFunc get_hashname one_hot_to_flat flat_to_one_hot EyesWrapper RandomObsWrapper GridObsWrapper PointmassEnvVelocity LQREnv PointmassEnvTorque PointmassEnvVision lqr_inf lqr_fin solve_lqr_env compute_vistation_demos sample_states compute_visitation get_reward inspect_path tabular_maxent_irl get_policy q_iteration softq_iteration logsumexp compute_visitation compute_occupancy softmax random_env_register DiscreteEnv random_env q_iteration_sparse compute_value_function q_iteration_dense TestEpsGreedyWrapper TestAbsorbingStateWrapper QIterationTest QIterationTest QIterationTest QIterationTest arg inherit _get_prefix new_from_args get_all_parameters _t_or_f add_args prefix _get_info SimpleMessage tweakfun colorize type_hint tweakval tweak prefix_log tee_log collect_args mkdir_p query_yes_no Message log HyperparamWrapper extract_hyperparams Hyperparameterized get_snapshot_gap remove_text_output _add_output get_snapshot_dir log_parameters get_snapshot_mode set_snapshot_gap log set_snapshot_dir tabular_prefix prefix pop_tabular_prefix push_prefix remove_tabular_output pop_prefix add_text_output MyEncoder get_log_tabular_only _remove_output set_snapshot_mode set_log_tabular_only add_tabular_output push_tabular_prefix reset TerminalTablePrinter record_tabular record_tabular_misc_stat dump_tabular reduce_trimmed_mean partition_params rename_partitions reduce_first aggregate_partitions reduce_mean_keys to_data_frame label_scatter_points normalize_loss reduce_last iterate_experiments reduce_mean filter_params reduce_mean_key rename_values timewise_data_frame _find_logs_recursive SubTimer save_exception setup_logger timer generate_exp_name record_tabular_stats reset_logger record_tabular_moving TabularQValuePlotter _pipe_segment_with_colons _visible_width _pipe_line_with_colons _column_type _latex_line_begin_tabular _build_simple_row _strip_invisible _align_header _mediawiki_row_with_attrs _format_table _more_generic _isint _build_row _build_line _normalize_tabular_data _pad_row simple_separated_format _format _type tabulate _afterpoint _padboth _align_column _isnumber _padright _isconvertible _padleft Model1 get_params_json Algo2 HyperparameterizedTest Algo1 Module _NewInitCaller default_device one_hot set_gpu logsumexp all_tensor copy_params_from_to tensor to_numpy ModuleTest TestModule DeviceTest _replace_funcs hex_to_rgb extract_distinct_params smart_repr load_exps_data flatten lookup Selector unique load_progress flatten_dict load_params to_json extract lazydict AttrDict shuffled iterate_minibatches_generic compact concat_paths iscanl iscanr scanr flatten truncate_path path_len scanl is_iterable extract_dict stdize check_nan plot_div reload_data parse_float_arg sliding_mean index make_plot make_plot_eps safer_eval get_plot_instruction send_css send_js summary_name RobotEnv make_box_space RobotEnvTest TestEnv BaseComponent DummyComponent BaseComponentTest ComponentBuilder DummyBuilder ComponentBuilderTest RobotComponentBuilder DynamixelClient DynamixelPosVelCurReader unsigned_to_signed DynamixelReader dynamixel_cleanup_handler signed_to_unsigned DynamixelClientTest DynamixelRobotComponent DynamixelRobotState DynamixelGroupConfig MockDynamixelClient RobotComponentTest patch_dynamixel CalibrationMap RobotGroupConfig ControlMode RobotGroupConfigTest HardwareRobotComponent HardwareRobotGroupConfig HardwareRobotComponentTest DummyHardwareRobotComponent RobotState RobotComponent RobotComponentTest TrackerType TrackerComponentBuilder TrackerGroupConfig HardwareTrackerComponent HardwareTrackerGroupConfig PhaseSpaceTrackerGroupConfig PhaseSpaceTrackerComponent TrackerComponent TrackerState VrTrackerComponent VrTrackerGroupConfig CoordinateSystem VrClient VrDevice VrPoseBatch BaseDClawObjectEnv BaseDClawEnv DClawPoseRandomDynamics DClawPoseFixed BaseDClawPose DClawPoseRandom DClawPoseTest DClawScrewRandom BaseDClawScrew DClawScrewRandomDynamics DClawScrewFixed DClawScrewTest disentangle_dclaw reset_to_states add_groups_for_reset BaseDClawTurn DClawTurnRandomDynamics DClawTurnRandom DClawTurnFixed DClawTurnTest DKittyAvoid BaseDKittyEnv BaseDKittyUprightEnv DKittyOrientRandomDynamics BaseDKittyOrient DKittyOrientRandom DKittyOrientFixed DKittyOrientTest DKittyPush DKittyStandFixed DKittyStandRandom DKittyStandRandomDynamics BaseDKittyStand DKittyStandTest DKittyWalkFixed DKittyWalkRandom DKittyWalkRandomDynamics BaseDKittyWalk DKittyWalkTest ManualAutoDKittyResetProcedure ScriptedDKittyResetProcedure main policy_factory policy_factory VrDeviceShell PlayShell main rollout_script do_rollouts parse_env_params parse_env_args EpisodeLogger DMRenderer DMRenderWindow DMSimScene MjPyRenderer MjPySimScene _MjlibWrapper _mj_warning_fn SimRandomizer Renderer RenderMode SimBackend SimScene SimSceneTest mjpy_and_dm test_model_file configurable set_env_params DummyWithConfig TestConfigurable ChildDummyWithConfig DummyWithConfigPickleable calculate_cosine average_quaternions AverageQuaternionsTest CalculateCosineTest AnimatedPlot register ResetProcedure ManualResetProcedure get_resource AssetBundle get_asset_path DummyResources TestAssetBundle MockDynamixelSdk patch_dynamixel MockDynamixelSdkTest MockMjData MockMjModel MockSimScene patch_sim_scene MockSimSceneTest patch_time MockTime DiscreteActionMultiWorldEnv MultiWorldEnvWrapper MJCModel pointmass_model default_model MJCTreeNode PMEnv pointmass_camera_config WheeledRoomGenerator draw_wall RoomWithWall FourRoom AntRoomGenerator draw_start_goal Room draw_borders PMRoomGenerator RoomGenerator RoomEnv encode_args __get_arg_config get_args make_python_command launch_python launch_shell DockerMode SlurmSingularity Local LaunchMode SingularityMode SSHDocker LocalDocker dedent EC2AutoconfigDocker EC2SpotDocker CodalabDocker LocalSingularity MountS3 Mount MountLocal MountGitRepo call_and_wait hash_file CommandBuilder run_single_doodad example_run_method Sweeper kwargs_wrapper run_sweep_parallel run_sweep_doodad run_sweep_serial DoodadSweeper example_function Autoconfig s3_upload s3_exists AWSCredentials SSHCredentials run run run launch GoalConditionedPolicy Policy ReplayBuffer GCSL class_select IndependentDiscretizedStochasticGoalPolicy cross_entropy_with_weights FCNetwork MultiInputNetwork DiscreteStochasticGoalPolicy StateGoalNetwork CBCNetwork CrossEntropyLoss Flatten get_horizon get_params default_gcsl_params default_markov_policy discretize_environment ClawEnv Discretized DiscretizedActionEnv normalize_image ImageandProprio ImageEnv unormalize_image GoalEnv GymGoalEnvWrapper LunarEnv heuristic LunarLander LunarLanderContinuous demo_heuristic_lander ContactDetector PointmassGoalEnv main SawyerViews SawyerDoorGoalEnv SawyerPushAndReachXYEnv SawyerViews SawyerPushGoalEnv get_env_params create_env failure register_pygame_envs register_mujoco_envs update format isinstance min OrderedDict iter max enumerate update hstack OrderedDict create_stats_ordered_dict vstack len concatenate array range array range register info make make make make realpath join dirname item realpath join dirname item array array hstack array array min max points get join format SubElement Element print glob from_file find_mins_maxs min toprettyxml choice uniform append ElementTree max range enumerate int join format remove print join format getpid array register info Point2DEnv ImageEnv FlatGoalEnv Point2DEnv ImageEnv list sorted slice array sum keys enumerate Sweeper run_method filter_fn Sweeper shuffle map append filter_fn Pool Sweeper launch_python print sleep len where append array diff cumsum insert svd clip exp square pi shape sum log seed get_state getstate set_state setstate isinstance print action_space render reset sample step range shape zeros register endswith GridSpec array range split array range GridSpec array spec_from_string find md5 encode update max join abs GridEnv gs len print get_transitions dot hash_env savetxt zeros sum rew_fn range n join print loadtxt hash_env dense_tabular_solver show list height set_value product make_plot width TabularQValuePlotter range enumerate lqr_fin T slice dot shape cholesky zeros range rew_Q lqr_fin rew_R lqr_inf zeros dynamics dot transition_matrix logsumexp get_policy initial_state_distribution zeros expand_dims range transition_matrix flat_dim einsum zeros flat_dim range one_hot_to_flat len get_policy arange len choice shape tabular_trans_distr append range array log flat_to_one_hot update sum heartbeat q_iteration record print adam_optimizer itr_message TrainingIterator compute_visitation zeros abs max flat_dim set_trace shape zeros float range one_hot_to_flat sum exp max expand_dims exp logsumexp reward_matrix log logsumexp dot num_actions range num_states sum transition_matrix zeros items list num_actions num_states items get_policy list num_actions num_states expand_dims range transition_matrix zeros einsum int list range lse max compute_value_function abs dot shape zeros sum max range reward_fn compute_value_function reward num_actions transitions num_states range zeros hasattr __init__ hasattr isinstance __init__ upper getargspec items list hasattr _get_prefix __init__ dict getattr zip _get_info ismethod append str makedirs print flush open join split Callable isinstance items list replace collect_args log getargspec items list replace locate log __init__ dict collect_args lower getattr startswith zip __name__ lower write isinstance any getattr type append open mkdir_p dirname remove close append join _add_output _remove_output _add_output remove _remove_output list values colorize write now strftime tzlocal append append join join push_prefix push_tabular_prefix pop_tabular_prefix pop list values writerow add dict DictWriter writeheader print_tabular keys log flush split join items list isinstance __module__ get_all_parameters dict any getattr mkdir_p dirname __name__ max min average nan record_tabular median std join listdir isdir print join defaultdict _find_logs_recursive append tuple defaultdict isinstance list defaultdict DataFrame append reduce_fn keys list defaultdict min append DataFrame keys range len list defaultdict append DataFrame keys list set mean append DataFrame product mean append DataFrame range len iterrows str concat text join set_snapshot_dir get_snapshot_dir remove_tabular_output now strftime tzlocal generate_exp_name add_tabular_output reset_logger join get_snapshot_dir print_exc mean min max record_tabular append mean extend record_tabular clear reset SubTimer time _times log join conv hasattr isinstance _isint _strip_invisible _isnumber _isint _isnumber rfind isinstance list max map get max list hasattr map index _fields zip_longest names keys range values len get join list search map _normalize_tabular_data zip hasattr hasattr linebetweenrows datarow lineabove padding _build_line linebelow _pad_row linebelowheader _build_row append headerrow extract_hyperparams HyperparamWrapper default_device isinstance pin_memory Tensor ndarray isinstance view scatter_ copy_ parameters data zip getattr dir isinstance DeviceWrapped print dict items list isinstance dict hasattr split join load_progress append load_params AttrDict hasattr isinstance list sorted map flatten unique isinstance isinstance f f pop randint list len arange slice shuffle range len list min array append max range len join list percentile50 plot print stds means percentile75 mean percentile25 Layout zip append Figure Scatter range enumerate len subplots percentile50 stds grid set_visible legendHandles list str set_linewidth savefig legend range replace plot means set_xlim enumerate percentile25 percentile75 fill_between set_ylim len extract nanmedian where nanpercentile make_plot Selector custom_series_splitter round max clip str list sorted extract_distinct_params map make_plot_eps append AttrDict custom_filter asarray format product replace sliding_mean mean zip float enumerate items int print maximum dict nanmean filter nanstd std _filters len get get parse_float_arg loads get_plot_instruction safer_eval args get_plot_instruction list sorted disable_variant extract_distinct_params data_paths load_exps_data set flatten list disconnect is_using warning OPEN_CLIENTS set array add_group str time get_state format motor_ids input print error reset_time eval set_state qpos set_motors_engaged sleep append disentangle_dclaw enumerate set_state set_motors_engaged sleep parse_args basicConfig add_argument ArgumentParser policy env_name format format parse_env_args unwrapped print eval reset set_motors_engaged input sleep range set_env_params num_repeats items time defaultdict record_duration list Trajectory render reset append step range action_fn seed make total_reward arg_def_fn parse_env_args format sorted print add_argument policy_factory durations output dict do_rollouts ArgumentParser env_factory set_env_params append basicConfig param info debug add_argument parse_env_params env_name ArgumentParser device parse_args int float is_value_convertable split user_warning_raise_exception import_module getattr split transpose matmul eigh vstack len str norm ndim any warning warning normpath join startswith geom joint compiler option root MJCModel default geom joint compiler option root MJCModel default array hlines isclose plot vlines draw_wall scatter get int bool __get_arg_config b64decode args_data loads use_cloudpickle decode __version__ launch_command join basename launch_command isinstance make_python_command mount_dir dirname MountLocal format encode_args md5 print wait Popen Sweeper launch_python print check_output print join check_call seed GCSL print set_gpu get_params manual_seed get_env_params create_env join Local LocalDocker EC2AutoconfigDocker run_sweep_doodad t size eq mean class_select logsumexp ReplayBuffer dict default_gcsl_params default_markov_policy discretize_environment get action_space DiscretizedActionEnv isinstance IndependentDiscretizedStochasticGoalPolicy DiscreteStochasticGoalPolicy abs array clip continuous seed format heuristic print render reset step sample_goal SawyerDoorGoalEnv sample stack append step dict update
# Goal-Conditioned Supervised Learning (GCSL) This repository provides an implementation of Goal-Conditioned Supervised Learning (GCSL), as proposed in *Learning to Reach Goals via Iterated Supervised Learning* The manuscript is available on [arXiv](https://arxiv.org/abs/1912.06088) If you use this codebase, please cite Dibya Ghosh, Abhishek Gupta, Justin Fu, Ashwin Reddy, Coline Devin, Benjamin Eysenbach, Sergey Levine. Learning to Reach Goals via Iterated Supervised Learning Bibtex source is provided at the bottom of the Readme. ## Setup Conda ``` conda env create -f environment/environment.yml
1,907
diccooo/Deep_Enhanced_Repr_for_IDRR
['discourse parsing']
['Deep Enhanced Representation for Implicit Discourse Relation Recognition']
data/pdtb2.py data/bpe/apply_bpe.py data.py builder.py data/bpe/learn_bpe.py config.py data/preprocess.py data/process.py main.py model.py ModelBuilder Config Data Dataset test main CharLayer Highway Classifier CNNLayer ElmoLayer test RNNLayer ArgEncoder Atten IDRCModel CorpusReader Datum preprocess arg_filter test main PreData testpredata create_parser get_pairs isolate_glossary recursive_split read_vocabulary check_vocab_and_split encode BPE create_parser replace_pair get_pair_statistics prune_stats get_vocabulary main update_pair_statistics Config test_size Data dev_size print size train_size append seed eval ModelBuilder manual_seed is_available train load model need_sub eval cuda IDRCModel train_loader append replace join iter_data Conn1 arg1_pos arg2_pos Conn2 print append arg_filter split load size print parse_args PreData testpredata add_argument ArgumentParser add set get_pairs endswith tuple min extend index check_vocab_and_split append append recursive_split int split add set split int Counter split defaultdict index defaultdict enumerate join list items replace tuple escape sub iter append compile split items list items sorted list get_pair_statistics deepcopy format replace_pair prune_stats write get_vocabulary dict update_pair_statistics max range values
# Deep Enhanced Representation for Implicit Discourse Relation Recognition This is the code for paper: Deep Enhanced Representation for Implicit Discourse Relation Recognition Hongxiao Bai, Hai Zhao (COLING 2018) ## Usage We use the processed data from https://github.com/cgpotts/pdtb2. Put the `pdtb2.csv` to `./data/raw/` first. Edit the paths of pre-trained word embedding file and ELMo files in `config.py`. Then prepare the data: bash ./prepare_data.sh
1,908
diegovalsesia/GPDNet
['denoising']
['Learning Graph-Convolutional Representations for Point Cloud Denoising']
Code/GPDNet_mse_sp/knn_matrix.py Code/GPDNet_mse_sp/test_conv_general.py Code/GPDNet_mse_sp/net_dn.py Code/GPDNet_mse_sp/C2C_distance.py Code/GPDNet_mse_sp/net_test_conv.py Code/GPDNet_mse_sp/Config.py Code/GPDNet_mse_sp/main.py compute_C2C Config knn_matrix_from_file knn_matrix_from_data2 knn_matrix_from_data Net Net testing sum savemat point_cloud_distance asarray print squeeze KDTree query print query KDTree print query cKDTree zeros_like compute_C2C reshape print denoise
# Learning Graph-Convolutional Representations for Point Cloud Denoising (ECCV 2020) Bibtex entry: ``` @inproceedings{pistilli2020learning, title={Learning Graph-Convolutional Representationsfor Point Cloud Denoising}, author={Pistilli, Francesca and Fracastoro, Giulia and Valsesia, Diego and Magli, Enrico}, booktitle={The European Conference on Computer Vision (ECCV)}, year={2020} } ```
1,909
diegovalsesia/GraphCNN-GAN
['point cloud generation']
['Learning Localized Generative Models for 3D Point Clouds via Graph Convolution']
gconv_up_aggr_code/test.py gconv_up_aggr_code/config.py gconv_up_aggr_code/gan.py gconv_up_aggr_code/general_utils.py gconv_up_aggr_code/tf_utils.py gconv_up_aggr_code/main.py gconv_up_aggr_code/in_out.py gconv_up_aggr_code/plyfile.py gconv_up_aggr_code/eulerangles.py Config quat2euler euler2quat mat2euler angle_axis2euler euler2angle_axis euler2mat GAN apply_augmentations rand_rotation_matrix draw_point_cloud iterate_in_chunks point_cloud_three_views add_gaussian_noise_to_pcloud PointCloudDataSet pc_loader load_ply files_in_subdirs unpickle_data create_dir load_all_point_clouds_under_folder pickle_data snc_category_to_synth_id load_point_clouds_from_filenames _open_stream _lookup_type PlyData _split_line PlyProperty PlyParseError make2d PlyListProperty PlyElement reset_tf_graph safe_log leaky_relu replicate_parameter_for_all_layers expand_scope_by_name append array cos sin eps asarray atan2 sqrt flat cos sin angle_axis2mat seed cos pi dot sqrt uniform sin array range len normal T rand_rotation_matrix dot z_rotate copy int exp abs transpose min mean sqrt argsort round argwhere zeros sum max range euler2mat concatenate draw_point_cloud makedirs dump len close open load close range open join search walk compile read T hstack vstack append split load_point_clouds_from_filenames join format print len close warn imap unique empty Pool enumerate append split dtype len property hasattr property property property isinstance tolist array reset_default_graph close
# Learning Localized Generative Models for 3D Point Clouds via Graph Convolution (ICLR 2019) Warning: trained models are large! A code-only repository is available at: https://github.com/diegovalsesia/GraphCNN-GAN-codeonly If you like our work, please cite the journal version of the paper. Journal version BibTex reference: ``` @ARTICLE{Valsesia2019journal, author={Diego {Valsesia} and Giulia {Fracastoro} and Enrico {Magli}}, journal={IEEE Transactions on Multimedia}, title={Learning Localized Representations of Point Clouds with Graph-Convolutional Generative Adversarial Networks}, year={2019},
1,910
diegovalsesia/speckle2void
['sar image despeckling', 'denoising']
['Speckle2Void: Deep Self-Supervised SAR Despeckling with Blind-Spot Convolutional Neural Networks']
libraries/DataGenerator.py Speckle2Void.py libraries/utils.py libraries/DataWrapper.py Speckle2V DataGenerator DataWrapper Conv2D Conv3D safe_mkdir mkdir
# [Speckle2Void: Deep Self-Supervised SAR Despeckling with Blind-Spot Convolutional NeuralNetworks](https://arxiv.org/abs/2007.02075) Speckle2Void is a self-supervised Bayesian despeckling framework that enables direct training on real SAR images. This method bypasses the problem of training a CNN on synthetically-speckled optical images, thus avoiding any domain gap and enabling learning of features from real SAR images. This repository contains python/tensorflow implementation of Speckle2Void, trained and tested on the TerraSAR-X dataset provided by ESA [archive](https://tpm-ds.eo.esa.int/oads/access/collection/TerraSAR-X). BibTex reference: ``` @ARTICLE{2020arXiv200702075B, author = {{Bordone Molini}, Andrea and {Valsesia}, Diego and {Fracastoro}, Giulia and {Magli}, Enrico}, title = "{Speckle2Void: Deep Self-Supervised SAR Despeckling with Blind-Spot Convolutional Neural Networks}", journal = {arXiv e-prints},
1,911
diehlj/iterated-sums-signature-py
['time series']
['Time-warping invariants of multidimensional time series']
iterated_sums_signature/divided_powers.py tests/test_divided_powers.py iterated_sums_signature/__init__.py setup.py tests/conftest.py iterated_sums_signature/iterated_sums_signature.py tests/test_iterated_sums_signature.py readme g monomials inner_product_qs_c M_sh exp CompositionShuffle is_primitive pi1_adjoint f CompositionQuasiShuffle pi1 projection_equal hoffman_LOG_dual hoffman_EXP_dual M_concat CompositionConcatenation safe_add project_smaller_equal coarser concatenation_to_shuffle concatenation_to_quasi_shuffle M_qs hoffman_EXP test_pi1 hoffman_LOG finer id_ _hoffman_EXP _hoffman_LOG project_equal test_f projection_smaller_equal Monomial compositions as_array terminal_values signature id pytest_addoption pytest_collection_modifyitems test_compositions test_divided_powers test_quasi_shuffle test_monomials get test_signature test_lead_lag CompositionConcatenation monomials finer range combinations_with_replacement safe_add clazz __class__ append list deg tuple CompositionShuffle append list deg product project_smaller_equal CompositionConcatenation range lift CompositionConcatenation lift CompositionConcatenation lift coarser items list LinearCombination coarser items list LinearCombination sorted keys tuple CompositionConcatenation hstack Monomial shape safe_add append range array LinearCombination diff addoption getoption skip add_marker Monomial M_qs list len terminal_values remove_zeros signature array range M_qs compositions list compositions terminal_values vstack append randint signature range M_qs len
diehlj/iterated-sums-signature-py
1,912
digling/edictor
['word alignment']
['A Web-Based Interactive Tool for Creating, Inspecting, Editing, and Publishing Etymological Datasets']
triples/template.py triples/triples.py triples/update.py triples/summary.py help/make_help.py triples/get_data.py get_max_id get_max_id execute max
EDICTOR ======= JavaScript program for interactive viewing, manipulating, and editing of wordlists, represented in form of TSV files. Checkout the [online application](http://edictor.digling.org) to get started or download this folder and open the application by loading the file index.html in a webbrowser. If you want to use the application in offline modus with Google Chrome, make sure to open the browser with the "disable-web-security" option. If you use Firefox, this should work out off the box.
1,913
dihardchallenge/dihard3_baseline
['speaker diarization']
['The Third DIHARD Diarization Challenge']
recipes/track1/local/diarization/VB_diarization_v2.py recipes/track1/local/diarization/split_rttm.py recipes/track1/local/segmentation/score_sad.py recipes/track1/local/segmentation/get_transform_probs_mat.py recipes/track1/local/segmentation/prepare_sad_targets.py recipes/track1/local/make_data_dir.py recipes/track1/local/diarization/VB_resegmentation.py recipes/track1/local/diarization/make_rttm.py write_segments_file RTTMTurn write_rttm_file Recording read_rttm_file write_wav_script_file warning write_utt2spk write_reco2num_spk main read_label_file Segment main get_args groupby load_rttm make_dir main write_rttm logsumexp_ne VB_diarization logdet DER frame_labels2posterior_mx forward_backward exp_ne logsumexp log_sparsity tril_to_sym precalculate_VtiEV load_rttm load_frame_counts write_rttm_file get_labels load_ivector_extractor main print_diagnostics Segment load_dubm main get_args run main subsample_frames _seconds_to_frames Segmentation sum_metrics get_scores_dataframe read_segments_file Recording _score_one_recording score_recordings read_uem_file main load_domains stem Path print Path ArgumentParser write_utt2spk list flac_dir rttm_dir data_dir exit from_iterable sad_dir write_reco2num_spk parse_args write_wav_script_file mkdir write_segments_file write_rttm_file add_argument print_help load_recordings parse_args add_argument ArgumentParser str join sorted get_args len append float range split makedirs sorted groupby load_rttm src_rttm_fn make_dir output_dir write_rttm zeros_like pi clf logsumexp_ne log subplot ones forward_backward savefig append sum precalculate_VtiEV range plot coo_matrix gamma compute_F_s T toarray print reshape inv dot log_sparsity repeat tril_to_sym eye zeros exp_ne array len dtype empty tril_indices range zeros argmax T zeros_like empty sum range exp isinf expand_dims sum max log expand_dims max evaluate isinf row print shape prod len empty astype tril_indices T list exp logsumexp log empty_like reversed range len transpose defaultdict zeros offset range onset print sum max len Path load_frame_counts float64 argmax seed initialize squeeze dubm_model get_labels load_ivector_extractor VB_diarization astype keys load_dubm enumerate max_speakers print frame_labels2posterior_mx ie_model read_mat_scp print_diagnostics init_rttm_filename exit print_help stdout read_matrix_ascii priors squeeze write_matrix_ascii array diag run array minimum arange ones shape convolve1d read_segments_file targets_dir annotated_segments segments from_records groupby read_csv groupby read_csv Timeline uri read_csv set update cls uris_ extend results_ __class__ components_ sorted sys_speech metric ref_speech append sorted sum_metrics reset_index miss_dur speech_dur report rename fa_dur DataFrame nonspeech_dur concat load_domains annotations_to_recordings sys_segments read_uem_file collar get_scores_dataframe uem_path ref_segments score_recordings recordings_table tabulate
Implementation of diarization baseline for the [Third DIHARD Speech Diarization Challenge (DIHARD III)](https://dihardchallenge.github.io/dihard3/). The baseline is based on [LEAP Lab's](http://leap.ee.iisc.ac.in/) submission to [DIHARD II](https://dihardchallenge.github.io/dihard2/): - Singh, Prachi, et. al. (2019). "LEAP Diarization System for Second DIHARD Challenge." Proceedings of INTERSPEECH 2019. ([paper](http://leap.ee.iisc.ac.in/navigation/publications/papers/DIHARD_2019_challenge_Prachi.pdf)) The x-vector extractor, PLDA model, UBM-GMM, and total variability matrix were trained on [VoxCeleb I and II](http://www.robots.ox.ac.uk/~vgg/data/voxceleb/). Prior to PLDA scoring and clustering, the x-vectors are centered and whitened using statistics estimated from the DIHARD III development and evaluation sets. For further details about the training pipeline, please consult the companion paper to the challenge: - Ryant, Neville et al. (2020). "The Third DIHARD Diarization Challenge." ([paper](http://arxiv.org/abs/2012.01477)) # Overview - [Prerequisites](#prerequisites)
1,914
diku-irlab/A66
['information retrieval']
['Evaluation Measures for Relevance and Credibility in Ranked Lists']
measures/measures.py lre gre monus nlre wcs nwcs iwcs wham cam cgre ngre clre print format format print monus range log range floor log lre clre len format print monus range log range floor log gre cgre len print format log range list setdefault sort dict append keys wcs iwcs len
The Project =========== This dataset was developed at the department of Computer Science at the University of Copenhagen (DIKU) in connection with the following article: _Evaluation Measures for Relevance and Credibility in Ranked Lists_ Christina Lioma, Jakob Grue Simonsen, and Birger Larsen (2017) ACM SIGIR International Conference on the Theory of Information Retrieval, pg. 91-98. [download from arXiv](https://arxiv.org/abs/1708.07157) The Data ======== The file `data` is a comma seperated values file with the following format:
1,915
dimitra-maoutsa/Connectivity_from_event_timing_patterns
['time series']
['Inferring network connectivity from event timing patterns']
simulate_network/simulation.py reconstruct_network/otsu_method.py reconstruct_network/inferring_connections_from_spikes.py reconstruct_network/calculate_AUCs.py calculate_AUCs solve_per_neuron otsu list roc_curve isnan auc len max concatenate cdist reshape argmin delete mean argsort dot pinv append sum array range argmax int T size floor histogram zeros sum range
# Inferring network connectivity from event timing patterns **Model-free method for inferring _synaptic interactions_ from _spike train recordings_.** By mapping spike timing data in **event spaces** _(spanned by inter-spike and cross-spike intervals)_, we identify synaptic interactions in networks of spiking neurons through **Event Space Linearisations (ESL)** . Here, we provide implementations of network simulations and reconstructions as described in: **Casadiego\*, Jose, Maoutsa\*, Dimitra, Timme, Marc,** _**Inferring network connectivity from event timing patterns**_, **Physical Review Letters, 2018** For further information refer to the article (_can be found here as pdf_). <br>
1,916
dimitymiller/cac-openset
['open set learning']
['Class Anchor Clustering: a Loss for Distance-based Open Set Recognition']
networks/closedSetClassifier.py eval_cacOpenset.py train_closedSet.py metrics.py eval_closedSet.py train_cacOpenset.py datasets/generate_trainval_splits.py datasets/utils.py utils.py networks/openSetClassifier.py datasets/generate_class_splits.py auroc accuracy val CACLoss train val train progress_bar SoftmaxTemp find_anchor_means format_time gather_outputs save_class_split save_trainval_split load_anchor_datasets get_anchor_loaders load_datasets create_target_map get_eval_loaders get_train_loaders create_dataSubsets get_data_stats BaseEncoder closedSetClassifier openSetClassifier BaseEncoder sum argmin len roc_curve min concatenate exp view mean unsqueeze lbda gather sum cuda log backward print to tensorboard len zero_grad min progress_bar CACLoss item step net enumerate add_scalar format replace name print tensorboard eval trial mkdir save dataset add_scalar criterion max int time join format_time write append range flush len int get_anchor_loaders squeeze mean gather_outputs range unsqueeze exp asarray Softmax min softmax cuda max net enumerate format print write dumps close open format print write dumps close open DataLoader create_dataSubsets load_datasets create_target_map DataLoader create_dataSubsets load_datasets create_target_map data asarray range targets MNIST print exit SVHN ImageFolder CIFAR10 CIFAR100 load_anchor_datasets create_dataSubsets DataLoader MNIST print exit SVHN ImageFolder CIFAR10 list Subset targets keys enumerate sort enumerate
# Class Anchor Clustering: a Distance-based Loss for Training Open Set Classifiers Class Anchor Clustering (CAC) loss is an entirely distance-based loss the explicitly encourages training data to form tight clusters around class-dependent anchor points in the logit space. ![Image description](images/githubdisplay.png) This repository contains the training and evaluation code from the paper: **Class Anchor Clustering: a Distance-based Loss for Training Open Set Classifiers** *Dimity Miller, Niko Suenderhauf, Michael Milford, Feras Dayoub* Published at the 2021 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV). [WACV Paper](https://openaccess.thecvf.com/content/WACV2021/papers/Miller_Class_Anchor_Clustering_A_Loss_for_Distance-Based_Open_Set_Recognition_WACV_2021_paper.pdf) [Supplementary Material](https://openaccess.thecvf.com/content/WACV2021/supplemental/Miller_Class_Anchor_Clustering_WACV_2021_supplemental.pdf) If you use this work, please cite:
1,917
dingguo1996/RANet
['semantic segmentation']
['RANet: Region Attention Network for Semantic Segmentation']
ops/intra_collection/__init__.py utils/logger.py ops/match_boundary/modules/match_boundary.py ops/match_boundary/functions/match_boundary.py utils/edge_sc_build.py ops/match_class/functions/match_class.py ops/vcount_cluster/setup.py train.py ops/follow_cluster/functions/follow_cluster.py ops/follow_cluster/__init__.py networks/__init__.py ops/vcount_cluster/__init__.py ops/split_repscore/modules/split_repscore.py ops/split_repscore/functions/split_repscore.py utils/edge_utils.py engine.py ops/match_class/setup.py ops/intra_collection/setup.py evaluate.py ops/follow_cluster/setup.py loss/lovasz_losses.py networks/pspnet.py ops/split_repscore/__init__.py ops/intra_collection/functions/intra_collection.py dataset/datasets.py ops/vcount_cluster/modules/vcount_cluster.py test.py ops/match_boundary/setup.py networks/ranet.py ops/vcount_cluster/functions/vcount_cluster.py ops/match_class/modules/match_class.py ops/follow_cluster/modules/follow_cluster.py loss/loss.py utils/pyt_utils.py ops/match_class/__init__.py loss/criterion.py utils/encoding.py ops/match_boundary/__init__.py ops/split_repscore/setup.py ops/intra_collection/modules/intra_collection.py networks/deeplabv3.py Engine predict_multiscale predict_sliding get_palette get_confusion_matrix predict_whole main get_parser pad_image set_bn_momentum lr_poly adjust_learning_rate get_parser set_bn_eval main str2bool VOCDataTestSet CSDataSet CSDataTestSet VOCDataSet CriterionOhemDSN2 CriterionDSN CriterionOhemDSN CriterionBoundary OhemCrossEntropy2d lovasz_grad flatten_binary_scores iou binary_xloss xloss lovasz_hinge_flat StableBCELoss lovasz_hinge lovasz_softmax_flat isnan mean flatten_probas lovasz_softmax iou_binary ASPPModule ResNet Bottleneck conv3x3 Seg_Model ResNet Bottleneck PSPModule conv3x3 Seg_Model ASPPModule RCB ResNet Bottleneck conv3x3 RIB Seg_Model FollowClusterFunction FollowCluster IntraCollectionFunction IntraCollection MatchBoundaryFunction MatchBoundary MatchClassFunction MatchClass SplitRepscoreFunction SplitRepscore VcountClusterFunction VcountCluster id2trainId single_core_build_edge onehot_to_binary_edges onehot_to_mask mask_to_onehot onehot_to_multiclass_edges CallbackContext allreduce AllReduce DataParallelModel _criterion_parallel_apply execute_replication_callbacks Reduce patch_replication_callback DataParallelCriterion get_logger LogFormatter load_model _dbg_interactive decode_predictions inv_preprocess decode_labels parse_devices ensure_dir all_reduce_tensor extant_file link_file reduce_tensor add_argument ArgumentParser append range len pad int isinstance transpose min shape Upsample cuda ceil zeros range max pad_image net isinstance transpose from_numpy shape Upsample cuda net data zoom predict_sliding copy shape zeros float bincount zeros astype range get_parser lr_poly eval __name__ __name__ cumsum sum len mean zip append float sum zip append float sum range mean lovasz_hinge_flat data lovasz_grad relu Variable sort dot float view Variable float flatten_binary_scores mean lovasz_softmax_flat data lovasz_grad Variable sort size dot append float abs size view filterfalse next iter enumerate ResNet load_model items list copy fromarray join uint8 replace squeeze len onehot_to_binary_edges astype makedirs logical_or id2trainId dirname save zeros mask_to_onehot array open argmax uint8 distance_transform_edt astype pad append range uint8 distance_transform_edt astype pad zeros expand_dims range join isinstance _worker len start is_grad_enabled append range Lock list hasattr __data_parallel_replicate__ modules enumerate len replicate setFormatter getLogger addHandler formatter makedirs StreamHandler setLevel INFO FileHandler reduce clone div_ all_reduce clone div_ load items time list format join isinstance info set OrderedDict warning load_state_dict device keys int list format join endswith device_count info append range split remove format system makedirs embed load new shape zeros numpy array range enumerate load isinstance concatenate new shape numpy append zeros argmax array range enumerate uint8 astype shape zeros numpy range
# RANet: Region Attention Network for Semantic Segmentation Paper Links: [**RANet: Region Attention Network for Semantic Segmentation**](https://papers.nips.cc/paper/2020/file/9fe8593a8a330607d76796b35c64c600-Paper.pdf). By Dingguo Shen, Yuanfeng Ji, Ping Li, Yi Wang, Di Lin. ### Citing RANet If you find RANet useful in your research, please consider citing: ```BibTex @article{shen2020ranet, title={RANet: Region Attention Network for Semantic Segmentation}, author={Shen, Dingguo and Ji, Yuanfeng and Li, Ping and Wang, Yi and Lin, Di}, journal={Advances in Neural Information Processing Systems},
1,918
dingxiaowei/MLAgents
['unity']
['Unity: A General Platform for Intelligent Agents']
ml-agents-envs/mlagents_envs/communicator_objects/capabilities_pb2.py ml-agents/mlagents/trainers/tests/test_tf_policy.py ml-agents/mlagents/trainers/environment_parameter_manager.py ml-agents/mlagents/trainers/cli_utils.py ml-agents/mlagents/trainers/run_experiment.py ml-agents/mlagents/trainers/components/reward_signals/curiosity/model.py ml-agents-envs/mlagents_envs/communicator_objects/command_pb2.py ml-agents-envs/mlagents_envs/mock_communicator.py ml-agents/mlagents/trainers/policy/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/unity_to_external_pb2.py ml-agents-envs/mlagents_envs/communicator.py gym-unity/gym_unity/envs/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/brain_parameters_pb2.py ml-agents/mlagents/trainers/learn.py ml-agents/mlagents/trainers/tests/test_barracuda_converter.py ml-agents-envs/mlagents_envs/side_channel/raw_bytes_channel.py ml-agents/mlagents/trainers/trainer/trainer.py gym-unity/gym_unity/__init__.py ml-agents-envs/mlagents_envs/side_channel/__init__.py utils/validate_meta_files.py ml-agents/mlagents/trainers/trainer_controller.py ml-agents/mlagents/trainers/components/bc/model.py ml-agents/mlagents/trainers/action_info.py ml-agents/mlagents/trainers/tests/test_ppo.py ml-agents/mlagents/tf_utils/__init__.py ml-agents/mlagents/trainers/components/reward_signals/__init__.py ml-agents-envs/setup.py ml-agents-envs/mlagents_envs/side_channel/engine_configuration_channel.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_output_pb2.py ml-agents/mlagents/trainers/tests/mock_brain.py ml-agents/mlagents/trainers/policy/checkpoint_manager.py ml-agents/mlagents/trainers/tests/test_bcmodule.py ml-agents/mlagents/trainers/tests/test_models.py ml-agents/mlagents/trainers/tests/test_trainer_controller.py ml-agents-envs/mlagents_envs/side_channel/incoming_message.py ml-agents/mlagents/trainers/components/reward_signals/reward_signal_factory.py ml-agents-envs/mlagents_envs/rpc_utils.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_initialization_output_pb2.py ml-agents/setup.py ml-agents/tests/yamato/setup_venv.py ml-agents/mlagents/trainers/barracuda.py ml-agents/mlagents/trainers/optimizer/tf_optimizer.py utils/run_markdown_link_check.py ml-agents/mlagents/trainers/env_manager.py ml-agents/mlagents/trainers/ppo/trainer.py ml-agents/mlagents/trainers/policy/policy.py ml-agents-envs/mlagents_envs/communicator_objects/agent_action_pb2.py ml-agents/mlagents/model_serialization.py ml-agents-envs/mlagents_envs/tests/test_rpc_communicator.py ml-agents-envs/mlagents_envs/tests/test_envs.py utils/validate_inits.py ml-agents-envs/mlagents_envs/side_channel/float_properties_channel.py ml-agents/mlagents/trainers/components/reward_signals/curiosity/signal.py ml-agents/mlagents/trainers/simple_env_manager.py ml-agents/mlagents/trainers/tf/tensorflow_to_barracuda.py ml-agents-envs/mlagents_envs/side_channel/outgoing_message.py ml-agents-envs/mlagents_envs/exception.py ml-agents-envs/mlagents_envs/registry/remote_registry_entry.py ml-agents/mlagents/trainers/trainer/__init__.py ml-agents/mlagents/trainers/upgrade_config.py ml-agents-envs/mlagents_envs/communicator_objects/unity_message_pb2.py ml-agents/mlagents/trainers/tests/test_learn.py ml-agents/tests/yamato/scripts/run_gym.py utils/validate_release_links.py ml-agents-envs/mlagents_envs/communicator_objects/agent_info_pb2.py ml-agents/mlagents/trainers/tests/test_demo_loader.py ml-agents-envs/mlagents_envs/communicator_objects/observation_pb2.py utils/validate_versions.py ml-agents-envs/mlagents_envs/tests/test_rpc_utils.py ml-agents-envs/mlagents_envs/tests/test_timers.py ml-agents/mlagents/trainers/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/custom_reset_parameters_pb2.py ml-agents/mlagents/trainers/tests/test_env_param_manager.py ml-agents-envs/mlagents_envs/tests/test_registry.py ml-agents-envs/mlagents_envs/communicator_objects/agent_info_action_pair_pb2.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_input_pb2.py ml-agents/mlagents/trainers/tests/test_nn_policy.py ml-agents-envs/mlagents_envs/timers.py ml-agents/tests/yamato/check_coverage_percent.py ml-agents/mlagents/trainers/tests/test_simple_rl.py ml-agents/mlagents/trainers/exception.py ml-agents/mlagents/trainers/tests/test_distributions.py gym-unity/gym_unity/tests/test_gym.py utils/make_readme_table.py ml-agents/mlagents/tf_utils/tf.py ml-agents/mlagents/trainers/tests/test_ghost.py ml-agents/mlagents/trainers/buffer.py ml-agents-envs/mlagents_envs/side_channel/side_channel.py ml-agents-envs/mlagents_envs/side_channel/environment_parameters_channel.py ml-agents/mlagents/trainers/tests/test_subprocess_env_manager.py ml-agents/mlagents/trainers/subprocess_env_manager.py ml-agents/mlagents/trainers/agent_processor.py ml-agents-envs/mlagents_envs/communicator_objects/engine_configuration_pb2.py ml-agents-envs/mlagents_envs/tests/test_env_utils.py ml-agents/mlagents/trainers/tests/test_rl_trainer.py ml-agents-envs/mlagents_envs/rpc_communicator.py ml-agents/mlagents/trainers/training_status.py ml-agents-envs/mlagents_envs/communicator_objects/demonstration_meta_pb2.py ml-agents-envs/mlagents_envs/__init__.py gym-unity/setup.py ml-agents/mlagents/trainers/behavior_id_utils.py ml-agents/mlagents/trainers/tests/test_config_conversion.py ml-agents/mlagents/trainers/sac/network.py ml-agents/mlagents/trainers/policy/tf_policy.py ml-agents/mlagents/trainers/optimizer/__init__.py ml-agents-envs/mlagents_envs/registry/__init__.py ml-agents/mlagents/trainers/tests/simple_test_envs.py ml-agents/mlagents/trainers/tests/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/unity_output_pb2.py ml-agents-envs/mlagents_envs/env_utils.py ml-agents-envs/mlagents_envs/communicator_objects/space_type_pb2.py ml-agents/mlagents/trainers/trainer_util.py ml-agents/mlagents/trainers/tests/test_trainer_util.py ml-agents-envs/mlagents_envs/logging_util.py ml-agents/mlagents/trainers/components/reward_signals/extrinsic/signal.py ml-agents/mlagents/trainers/sac/trainer.py ml-agents-envs/mlagents_envs/side_channel/side_channel_manager.py ml-agents/tests/yamato/training_int_tests.py ml-agents/mlagents/trainers/tests/test_sac.py ml-agents/mlagents/trainers/trajectory.py ml-agents/mlagents/trainers/settings.py ml-agents/mlagents/trainers/ppo/optimizer.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_initialization_input_pb2.py ml-agents-envs/mlagents_envs/base_env.py ml-agents-envs/mlagents_envs/communicator_objects/header_pb2.py ml-agents/mlagents/trainers/tests/test_stats.py ml-agents/mlagents/trainers/components/reward_signals/gail/model.py ml-agents/mlagents/trainers/tests/test_reward_signals.py ml-agents-envs/mlagents_envs/side_channel/stats_side_channel.py ml-agents/mlagents/trainers/components/reward_signals/gail/signal.py ml-agents-envs/mlagents_envs/tests/test_side_channel.py ml-agents/mlagents/trainers/tf/models.py ml-agents/mlagents/trainers/tf/distributions.py ml-agents-envs/mlagents_envs/registry/base_registry_entry.py ml-agents/mlagents/trainers/ghost/controller.py ml-agents/mlagents/trainers/sac/optimizer.py ml-agents/tests/yamato/standalone_build_tests.py ml-agents-envs/mlagents_envs/environment.py ml-agents/mlagents/trainers/tests/test_training_status.py ml-agents/mlagents/trainers/demo_loader.py ml-agents/mlagents/trainers/ghost/trainer.py ml-agents-envs/mlagents_envs/registry/binary_utils.py ml-agents/tests/yamato/editmode_tests.py ml-agents/mlagents/trainers/tests/test_settings.py ml-agents/mlagents/trainers/components/bc/module.py ml-agents-envs/mlagents_envs/communicator_objects/unity_input_pb2.py ml-agents-envs/mlagents_envs/tests/test_steps.py ml-agents/mlagents/trainers/tests/test_buffer.py ml-agents/mlagents/trainers/trainer/rl_trainer.py ml-agents/mlagents/trainers/tests/test_agent_processor.py ml-agents-envs/mlagents_envs/communicator_objects/unity_to_external_pb2_grpc.py ml-agents/tests/yamato/yamato_utils.py ml-agents/tests/yamato/scripts/run_llapi.py ml-agents/mlagents/trainers/stats.py ml-agents-envs/mlagents_envs/registry/unity_env_registry.py ml-agents/mlagents/trainers/tests/test_trajectory.py ml-agents/mlagents/trainers/optimizer/optimizer.py VerifyVersionCommand UnityGymException ActionFlattener UnityToGymWrapper create_mock_vector_steps test_gym_wrapper_multi_visual_and_vector test_gym_wrapper create_mock_group_spec test_branched_flatten setup_mock_unityenvironment test_gym_wrapper_visual test_gym_wrapper_single_visual_and_vector VerifyVersionCommand _get_frozen_graph_node_names export_policy_model _make_frozen_graph _get_output_node_names _get_input_node_names convert_frozen_to_onnx _enforce_onnx_conversion SerializationSettings _process_graph set_warnings_enabled generate_session_config ActionInfo AgentManager AgentProcessor AgentManagerQueue BarracudaWriter fuse print_known_operations compress Build sort lstm write fuse_batchnorm_weights trim mean gru Model summary Struct parse_args to_json rnn BehaviorIdentifiers get_global_agent_id create_name_behavior_id BufferException AgentBuffer StoreConfigFile _load_config DetectDefaultStoreTrue DetectDefault load_config _create_parser make_demo_buffer write_demo get_demo_files load_demonstration write_delimited demo_to_buffer EnvironmentParameterManager EnvManager EnvironmentStep SamplerException TrainerConfigError CurriculumError CurriculumConfigError MetaCurriculumError TrainerConfigWarning CurriculumLoadingError UnityTrainerException TrainerError write_timing_tree create_environment_factory write_run_options parse_command_line run_training write_training_status main run_cli get_version_string main parse_command_line ScheduleType TrainerSettings PPOSettings ConstantSettings GaussianSettings strict_to_cls RewardSignalSettings EnvironmentSettings ParameterRandomizationType EnvironmentParameterSettings check_and_structure RewardSignalType TrainerType MultiRangeUniformSettings HyperparamSettings NetworkSettings SACSettings UniformSettings SelfPlaySettings Lesson EngineSettings EncoderType RunOptions GAILSettings CheckpointSettings BehavioralCloningSettings ParameterRandomizationSettings ExportableSettings CompletionCriteriaSettings defaultdict_to_dict CuriositySettings SimpleEnvManager StatsWriter StatsSummary ConsoleWriter StatsReporter GaugeWriter TensorboardWriter StatsPropertyType CSVWriter worker EnvironmentResponse EnvironmentRequest UnityEnvWorker StepResponse SubprocessEnvManager EnvironmentCommand TrainerController TrainerFactory initialize_trainer handle_existing_directories StatusMetaData StatusType GlobalTrainingStatus AgentExperience Trajectory SplitObservations parse_args write_to_yaml_file convert convert_behaviors main remove_nones convert_samplers_and_curriculum convert_samplers BCModel BCModule create_reward_signal RewardSignal CuriosityModel CuriosityRewardSignal ExtrinsicRewardSignal GAILModel GAILRewardSignal GhostController GhostTrainer Optimizer TFOptimizer NNCheckpointManager NNCheckpoint Policy UnityPolicyException TFPolicy UnityPolicyException PPOOptimizer PPOTrainer get_gae discount_rewards SACPolicyNetwork SACTargetNetwork SACNetwork SACOptimizer SACTrainer simulate_rollout create_mock_pushblock_behavior_specs create_mock_banana_behavior_specs setup_test_behavior_specs create_steps_from_behavior_spec create_mock_3dball_behavior_specs make_fake_trajectory create_mock_steps RecordEnvironment clamp SimpleEnvironment MemoryEnvironment test_end_episode test_agent_deletion test_agent_manager_queue test_agentprocessor test_agent_manager test_agent_manager_stats create_mock_policy test_barracuda_converter test_policy_conversion test_bcmodule_rnn_update test_bcmodule_update test_bcmodule_constant_lr_update test_bcmodule_dc_visual_update create_bc_module test_bcmodule_defaults test_bcmodule_rnn_dc_update test_buffer_sample construct_fake_buffer test_num_experiences assert_array fakerandint test_buffer test_buffer_truncate test_convert test_convert_behaviors test_remove_nones test_unsupported_version_raises_error test_load_demo test_demo_mismatch test_edge_cases test_load_demo_dir test_multicategorical_distribution test_tanh_distribution test_gaussian_distribution test_sampler_conversion test_sampler_and_constant_conversion test_create_manager test_curriculum_raises_no_completion_criteria_conversion test_curriculum_conversion test_curriculum_raises_all_completion_criteria_conversion test_load_and_set dummy_config test_publish_queue test_process_trajectory basic_options test_run_training test_yaml_args test_bad_env_path test_commandline_args test_env_args test_create_input_placeholders create_behavior_spec test_min_visual_size test_load_save create_policy_mock test_normalization ModelVersionTest test_policy_evaluate _compare_two_policies test_trainer_increment_step test_trainer_update_policy test_ppo_optimizer_update test_ppo_optimizer_update_curiosity test_process_trajectory test_rl_functions test_add_get_policy _create_ppo_optimizer_ops_mock dummy_config test_ppo_optimizer_update_gail test_ppo_get_value_estimates test_gail_dc_visual sac_dummy_config reward_signal_update reward_signal_eval test_extrinsic extrinsic_dummy_config test_gail_rnn test_curiosity_cc test_gail_cc ppo_dummy_config test_curiosity_dc curiosity_dummy_config test_curiosity_visual test_curiosity_rnn create_optimizer_mock gail_dummy_config FakeTrainer create_rl_trainer test_rl_trainer test_summary_checkpoint test_advance test_clear_update_buffer test_sac_update_reward_signals test_add_get_policy create_sac_optimizer_mock test_sac_optimizer_update dummy_config test_advance test_sac_save_load_buffer check_dict_is_at_least test_environment_settings test_strict_to_cls test_memory_settings_validation check_if_different test_is_new_instance test_no_configuration test_env_parameter_structure test_exportable_settings test_trainersettings_structure test_reward_signal_structure test_simple_ghost_fails test_gail test_visual_advanced_sac _check_environment_trains test_visual_sac test_2d_ppo test_simple_sac test_simple_ghost default_reward_processor test_simple_asymm_ghost test_gail_visual_ppo test_simple_ppo test_gail_visual_sac test_recurrent_ppo DebugWriter test_recurrent_sac test_simple_asymm_ghost_fails test_visual_advanced_ppo test_visual_ppo test_2d_sac simple_record test_tensorboard_writer test_stat_reporter_add_summary_write test_tensorboard_writer_clear test_gauge_stat_writer_sanitize ConsoleWriterTest test_csv_writer test_stat_reporter_property MockEnvWorker mock_env_factory SubprocessEnvManagerTest test_subprocess_env_raises_errors create_worker_mock test_subprocess_env_endtoend basic_mock_brain test_take_action_returns_action_info_when_available test_convert_version_string test_checkpoint_writes_tf_and_nn_checkpoints test_take_action_returns_nones_on_missing_values test_take_action_returns_empty_with_no_agents FakePolicy test_initialization_seed test_start_learning_trains_until_max_steps_then_saves basic_trainer_controller trainer_controller_with_take_step_mocks test_advance_adds_experiences_to_trainer_and_trains trainer_controller_with_start_learning_mocks test_start_learning_trains_forever_if_no_train_model test_initialize_ppo_trainer test_load_config_invalid_yaml test_load_config_missing_file test_handles_no_config_provided dummy_config test_load_config_valid_yaml test_existing_directories test_globaltrainingstatus test_model_management StatsMetaDataTest test_trajectory_to_agentbuffer test_split_obs np_zeros_no_float64 np_array_no_float64 _check_no_float64 np_ones_no_float64 OutputDistribution DiscreteOutputDistribution MultiCategoricalDistribution GaussianDistribution ModelUtils Tensor3DShape NormalizerTensors get_layer_shape pool_to_HW flatten sqr_diff process_layer process_model get_layer_rank slow_but_stable_topological_sort get_attr basic_lstm ModelBuilderContext order_by get_epsilon get_tensor_dtype replace_strings_in_list debug embody by_op get_tensor_dims strided_slice remove_duplicates_from_list axis_to_barracuda by_name locate_actual_output_node convert strides_to_HW get_tensor_data very_slow_but_stable_topological_sort gru RLTrainer Trainer main check_coverage main clean_previous_results TestResults parse_results main main main run_training run_inference find_executables override_config_file init_venv get_unity_executable_path override_legacy_config_file get_base_path run_standalone_build checkout_csharp_version _override_config_dict undo_git_checkout get_base_output_path test_closing test_run_environment test_closing test_run_environment VerifyVersionCommand ActionType BehaviorMapping TerminalStep DecisionSteps BehaviorSpec TerminalSteps BaseEnv DecisionStep Communicator UnityEnvironment validate_environment_path launch_executable get_platform UnityCommunicatorStoppedException UnityObservationException UnityWorkerInUseException UnityException UnityCommunicationException UnityTimeOutException UnitySideChannelException UnityEnvironmentException UnityActionException get_logger set_log_level MockCommunicator RpcCommunicator UnityToExternalServicerImplementation _generate_split_indices process_pixels behavior_spec_from_proto _raise_on_nan_and_inf observation_to_np_array steps_from_proto _process_vector_observation _process_visual_observation _get_thread_timer TimerNode merge_gauges hierarchical_timer add_metadata get_timer_tree get_timer_root reset_timers get_timer_stack_for_thread set_gauge timed GaugeNode TimerStack UnityToExternalProtoServicer add_UnityToExternalProtoServicer_to_server UnityToExternalProtoStub BaseRegistryEntry ZipFileWithProgress get_tmp_dir get_local_binary_path_if_exists get_local_binary_path load_local_manifest load_remote_manifest download_and_extract_zip print_progress RemoteRegistryEntry UnityEnvRegistry EngineConfigurationChannel EngineConfig EnvironmentParametersChannel FloatPropertiesChannel IncomingMessage OutgoingMessage RawBytesChannel SideChannel SideChannelManager StatsAggregationMethod StatsSideChannel test_initialization test_reset test_returncode_to_signal_name test_log_file_path_is_set test_close test_step test_port_defaults test_handles_bad_filename test_check_communication_compatibility test_set_logging_level test_validate_path mock_glob_method test_launch_executable test_validate_path_empty create_registry test_basic_in_registry delete_binaries test_rpc_communicator_checks_port_on_create test_rpc_communicator_create_multiple_workers test_rpc_communicator_close test_batched_step_result_from_proto_raises_on_nan test_process_pixels test_process_visual_observation_bad_shape test_agent_behavior_spec_from_proto proto_from_steps_and_action test_batched_step_result_from_proto test_action_masking_continuous test_action_masking_discrete_1 generate_list_agent_proto generate_uncompressed_proto_obs test_batched_step_result_from_proto_raises_on_infinite generate_compressed_proto_obs test_vector_observation proto_from_steps test_action_masking_discrete generate_compressed_data test_action_masking_discrete_2 test_process_pixels_gray test_process_visual_observation test_raw_bytes test_int_channel test_message_float_list IntChannel test_engine_configuration test_message_bool test_message_string test_float_properties test_environment_parameters test_message_int32 test_stats_channel test_message_float32 test_decision_steps test_specs test_terminal_steps test_empty_terminal_steps test_action_generator test_empty_decision_steps test_timers decorated_func table_line ReleaseInfo validate_packages main NonTrivialPEP420PackageFinder main get_release_tag check_file test_pattern main check_all_files git_ls_files set_academy_version_string _escape_non_none extract_version_string print_release_tag_commands check_versions set_package_version set_version set_extension_package_version MagicMock create_mock_vector_steps UnityToGymWrapper sample create_mock_group_spec setup_mock_unityenvironment step MagicMock create_mock_vector_steps UnityToGymWrapper create_mock_group_spec setup_mock_unityenvironment MagicMock create_mock_vector_steps UnityToGymWrapper sample create_mock_group_spec setup_mock_unityenvironment step MagicMock create_mock_vector_steps UnityToGymWrapper sample reset create_mock_group_spec setup_mock_unityenvironment step MagicMock create_mock_vector_steps UnityToGymWrapper sample reset create_mock_group_spec setup_mock_unityenvironment step tuple CONTINUOUS range DISCRETE list array range BehaviorMapping convert_to_barracuda convert convert_to_onnx _make_frozen_graph _enforce_onnx_conversion convert_frozen_to_onnx info model_path makedirs tf_optimize make_model _get_output_node_names _get_input_node_names info brain_name optimize_graph _get_frozen_graph_node_names add _get_frozen_graph_node_names name add node set brain_name info set_verbosity ConfigProto join isdir print replaceFilenameExtension add_argument exit verbose source_file ArgumentParser target_file sqrt topologicalSort list hasattr layers addEdge Graph print inputs set len list hasattr layers print filter match trim_model compile data layers print tensors float16 replace layers dumps layers isinstance print tensors inputs zip to_json globals Build array_equal pool reduce Build tanh mad tanh mul Build concat add sigmoid sub mad _ tanh mul Build concat add sigmoid mad print sorted keys add_argument_group add_argument ArgumentParser resequence_and_append obs from_observations steps_from_proto vector_actions AgentBuffer append reset_agent vector_observations array visual_observations enumerate make_demo_buffer load_demonstration zip observation_shapes enumerate isdir isfile get_demo_files write SerializeToString _EncodeVarint len parse_args start_learning join save_state join join set_warnings_enabled warning __version__ DEBUG seed load_model set_log_level as_dict debug run_training add_timer_metadata info INFO get_version_string train_model API_VERSION print dumps randint parse_command_line run_cli add_argument ArgumentParser from_dict experiment_config_path load_config fields_dict update items list check_and_structure structure register_structure_hook unstructure defaultdict dict_to_defaultdict register_structure_hook register_unstructure_hook structure RLock get_timer_root reset_timers put _send_response StepResponse env_factory list behavior_specs _generate_all_results set_log_level apply get_and_reset_stats set_actions StatsSideChannel action set_configuration EngineConfigurationChannel payload BEHAVIOR_SPECS STEP EnvironmentParametersChannel items EnvironmentResponse isinstance reset RESET step join SACTrainer GhostTrainer PPOTrainer get_minimum_reward_buffer_size trainer_type isdir get update list items copy MemorySettings structure to_settings list items isinstance pop items list print dict pop items list get print set add append keys range len get pop unstructure print convert_behaviors convert_samplers_and_curriculum convert_samplers output_config_path curriculum remove_nones print write_to_yaml_file convert sampler trainer_config_path parse_args get rcls list zeros_like size reversed range append discount_rewards arange ones BehaviorSpec append array int ones AgentExperience append zeros sum range len pop action_shape to_agentbuffer make_fake_trajectory is_action_discrete observation_shapes int BehaviorSpec zeros Mock Mock ActionInfo publish_trajectory_queue range create_mock_steps AgentProcessor empty create_mock_policy add_experiences Mock assert_has_calls ActionInfo publish_trajectory_queue range call create_mock_steps append AgentProcessor empty create_mock_policy add_experiences Mock assert_has_calls ActionInfo end_episode publish_trajectory_queue range call create_mock_steps append AgentProcessor empty create_mock_policy add_experiences AgentManager create_mock_policy Mock get_nowait AgentManagerQueue put Mock assert_any_call remove record_environment_stats AgentManager add_writer StatsReporter write_stats join remove _get_candidate_names convert _get_default_tempdir dirname abspath isfile next TrainerSettings create_policy_mock SerializationSettings model_path reset_default_graph checkpoint TrainerSettings TFPolicy initialize_or_load BehavioralCloningSettings create_bc_module create_mock_3dball_behavior_specs update items list create_mock_3dball_behavior_specs BehavioralCloningSettings create_bc_module update items list create_mock_3dball_behavior_specs BehavioralCloningSettings current_lr create_bc_module update items list create_mock_3dball_behavior_specs BehavioralCloningSettings create_bc_module update items list create_mock_banana_behavior_specs BehavioralCloningSettings create_bc_module update items list create_mock_banana_behavior_specs BehavioralCloningSettings create_bc_module flatten list range len append range AgentBuffer resequence_and_append get_batch construct_fake_buffer assert_array make_mini_batch AgentBuffer reset_agent array resequence_and_append sample_mini_batch construct_fake_buffer AgentBuffer resequence_and_append construct_fake_buffer AgentBuffer resequence_and_append list construct_fake_buffer AgentBuffer truncate values safe_load convert_behaviors safe_load convert enumerate remove_nones load_demonstration demo_to_buffer dirname abspath load_demonstration demo_to_buffer dirname abspath dirname abspath dirname abspath mock_open BytesIO DemonstrationMetaProto write_delimited from_dict safe_load curriculum from_dict safe_load curriculum from_dict safe_load curriculum from_dict safe_load EnvironmentParameterManager environment_parameters create_tf_graph setup_test_behavior_specs load_weights init_load_weights zip assert_array_equal get_weights PPOTrainer create_policy GhostController GhostTrainer PPOTrainer subscribe_trajectory_queue setup_test_behavior_specs put advance make_fake_trajectory from_name_behavior_id AgentManagerQueue add_policy brain_name create_policy GhostController GhostTrainer PPOTrainer simulate_rollout get_nowait setup_test_behavior_specs _swap_snapshots advance publish_policy_queue from_name_behavior_id AgentManagerQueue add_policy brain_name create_policy clear safe_load MagicMock parse_command_line clear parse_command_line parse_command_line DISCRETE int BehaviorSpec create_input_placeholders observation_shapes create_behavior_spec TFPolicy setup_test_behavior_specs TrainerSettings join _set_step initialize_or_load create_policy_mock SerializationSettings model_path _compare_two_policies checkpoint list evaluate agent_id create_steps_from_behavior_spec behavior_spec assert_array_equal TrainerSettings list evaluate agent_id create_steps_from_behavior_spec behavior_spec create_policy_mock reset_default_graph TrainerSettings TFPolicy update_normalization to_agentbuffer setup_test_behavior_specs make_fake_trajectory zeros range run evolve PPOOptimizer TFPolicy setup_test_behavior_specs update simulate_rollout behavior_spec _create_ppo_optimizer_ops_mock reset_default_graph update simulate_rollout behavior_spec _create_ppo_optimizer_ops_mock reset_default_graph update simulate_rollout behavior_spec _create_ppo_optimizer_ops_mock reset_default_graph items list get_trajectory_value_estimates to_agentbuffer make_fake_trajectory _create_ppo_optimizer_ops_mock next_obs reset_default_graph assert_array_almost_equal array discount_rewards Mock brain_name _increment_step from_name_behavior_id assert_called_with add_policy PPOTrainer _update_policy simulate_rollout setup_test_behavior_specs MemorySettings from_name_behavior_id add_policy PPOTrainer create_policy list values Mock brain_name from_name_behavior_id add_policy PPOTrainer PPOOptimizer TFPolicy setup_test_behavior_specs SACOptimizer simulate_rollout behavior_spec evaluate_batch simulate_rollout prepare_update _execute_model behavior_spec update_dict make_mini_batch policy BehavioralCloningSettings create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update TrainerSettings FakeTrainer set_is_policy_updating end_episode list create_rl_trainer values items list construct_fake_buffer create_rl_trainer _clear_update_buffer Mock create_rl_trainer set_is_policy_updating subscribe_trajectory_queue advance put make_fake_trajectory publish_policy_queue AgentManagerQueue add_policy get_nowait range Mock list assert_has_calls create_rl_trainer subscribe_trajectory_queue summary_freq checkpoint_interval put make_fake_trajectory publish_policy_queue advance AgentManagerQueue add_policy get_nowait range TFPolicy setup_test_behavior_specs SACOptimizer update simulate_rollout create_sac_optimizer_mock behavior_spec reset_default_graph simulate_rollout create_sac_optimizer_mock behavior_spec update_reward_signals reset_default_graph SACTrainer save_model simulate_rollout num_experiences setup_test_behavior_specs behavior_spec from_name_behavior_id add_policy brain_name create_policy SACTrainer list SACTrainer values setup_test_behavior_specs from_name_behavior_id brain_name create_policy list items items list isinstance zip RunOptions check_if_different TrainerSettings RunOptions structure structure structure RunOptions from_dict check_dict_is_at_least safe_load as_dict EnvironmentSettings print EnvironmentParameterManager evolve SimpleEnvironment _check_environment_trains hyperparameters evolve SimpleEnvironment _check_environment_trains hyperparameters evolve SimpleEnvironment _check_environment_trains network_settings evolve SimpleEnvironment hyperparameters _check_environment_trains network_settings evolve MemoryEnvironment hyperparameters _check_environment_trains evolve SimpleEnvironment _check_environment_trains hyperparameters evolve SimpleEnvironment _check_environment_trains hyperparameters evolve SimpleEnvironment _check_environment_trains network_settings evolve SimpleEnvironment hyperparameters _check_environment_trains network_settings evolve MemoryEnvironment hyperparameters _check_environment_trains evolve SimpleEnvironment SelfPlaySettings _check_environment_trains evolve SimpleEnvironment SelfPlaySettings _check_environment_trains evolve SimpleEnvironment SelfPlaySettings _check_environment_trains evolve SimpleEnvironment SelfPlaySettings _check_environment_trains evolve SimpleEnvironment BehavioralCloningSettings _check_environment_trains simple_record evolve SimpleEnvironment BehavioralCloningSettings hyperparameters _check_environment_trains simple_record evolve SimpleEnvironment BehavioralCloningSettings hyperparameters _check_environment_trains simple_record clear assert_called_once_with Mock get_stats_summaries add_stat add_writer StatsReporter float range write_stats clear Mock add_property add_writer StatsReporter assert_called_once_with sleep TensorboardWriter StatsSummary write_stats close SubprocessEnvManager simple_env_factory _check_environment_trains default_config default_config close SubprocessEnvManager MagicMock TrainerSettings basic_mock_brain BehaviorSpec get_action empty FakePolicy TrainerSettings MagicMock basic_mock_brain DecisionSteps get_action array FakePolicy TrainerSettings MagicMock basic_mock_brain ActionInfo DecisionSteps get_action array FakePolicy _convert_version_string TrainerSettings sess MagicMock basic_mock_brain graph SerializationSettings assert_called_once_with brain_name checkpoint FakePolicy GhostController MagicMock GhostController TrainerController MagicMock assert_called_with MagicMock start_learning assert_called_once MagicMock assert_not_called start_learning assert_called_once MagicMock MagicMock assert_called_once MagicMock advance add assert_not_called behaviors behaviors TrainerFactory generate _load_config StringIO mkdir join handle_existing_directories join set_parameter_state LESSON_NUM load_state NOTAREALKEY get_parameter_state save_state join NNCheckpoint time add_checkpoint set_parameter_state CHECKPOINTS track_final_checkpoint append from_observations range ones items list to_agentbuffer add set make_fake_trajectory extract_stack filename get __old_np_array _check_no_float64 get _check_no_float64 __old_np_zeros get __old_np_ones _check_no_float64 endswith len print HasField hasattr get_attr isinstance get_attr tensor_shape ndarray isinstance shape int_val bool_val float_val ListFields name ndarray isinstance str tensor_content ndarray product isinstance get_tensor_dtype print get_tensor_dims unpack int_val bool_val array float_val enter append add set Build mul sub insert Build tolist append range len locate_actual_output_node name find_tensor_by_name split locate_actual_output_node name lstm find_tensor_by_name find_forget_bias split get_layer_shape id Struct tensor get_layer_rank layer_ranks hasattr name patch_data rank input_shapes out_shapes input get_attr append replace_strings_in_list tensors embody astype op inputs zip enumerate print float32 patch_data_fn model_tensors map_ignored_layer_to_its_input co_argcount len items list hasattr get_tensors name print process_layer eval slow_but_stable_topological_sort ModelBuilderContext sort assign_ids pop range insert len layers verbose Struct process_model open print_known_operations fuse compress node GraphDef Model dims_to_barracuda_shape insert get_tensor_dims inputs MessageToJson ParseFromString cleanup_layers read memories sort write trim summary print_supported_ops print join exit walk float check_coverage join remove mkdir rmdir exists documentElement getAttribute parse join clean_previous_results parse_results get_unity_executable_path exit returncode get_base_path copy2 init_venv add_argument ArgumentParser split strip run_standalone_build override_config_file run_inference get_base_path rename abspath checkout_csharp_version exists run dirname get_base_output_path init_venv override_legacy_config_file copy int time join print run_standalone_build makedirs find_executables join time print run python run_training csharp exists join move get_unity_executable_path print makedirs dirname get_base_output_path run join X_OK frozenset splitext append access walk check_call check_call check_call list _override_config_dict values items list isinstance update list values check_call str UnityToGymWrapper print step reset sample UnityEnvironment range reset UnityEnvironment close UnityToGymWrapper get_steps is_action_discrete format EngineConfigurationChannel randn set_configuration_parameters discrete_action_branches len action_size any set_actions is_action_continuous column_stack join basename replace glob debug getcwd normpath validate_environment_path debug add setLevel getLogger basicConfig setLevel tuple vector_action_size mean reshape array data compressed_data reshape process_pixels shape array mean isnan array _raise_on_nan_and_inf sum is_action_discrete _generate_split_indices ones discrete_action_branches len astype _raise_on_nan_and_inf any cast split append _process_vector_observation bool _process_visual_observation array observation_shapes enumerate range len get_ident TimerStack perf_counter push items list merge reset method_handlers_generic_handler add_generic_rpc_handlers download_and_extract_zip get_local_binary_path_if_exists debug range glob hexdigest join get_tmp_dir join chmod gettempdir makedirs uuid4 join int str remove get_tmp_dir exists chmod print glob rmtree urlopen print_progress hexdigest print int min max uuid4 join str get_tmp_dir load_local_manifest urlopen UnityEnvironment close MockCommunicator UnityEnvironment MockCommunicator _executable_args UnityEnvironment MockCommunicator index get_steps obs close reset MockCommunicator zip UnityEnvironment observation_shapes len get_steps obs zip ones step close MockCommunicator set_actions zeros UnityEnvironment observation_shapes len UnityEnvironment close MockCommunicator validate_environment_path validate_environment_path launch_executable PermissionError set_log_level rmtree get_tmp_dir RemoteRegistryEntry register UnityEnvRegistry create_registry make close reset step range delete_binaries close RpcCommunicator close RpcCommunicator close RpcCommunicator list extend ObservationProto AgentInfoProto append prod range len fromarray uint8 BytesIO astype save ObservationProto generate_compressed_data extend shape ObservationProto shape tolist extend obs concatenate action_mask agent_id ObservationProto AgentInfoProto append generate_uncompressed_proto_obs proto_from_steps generate_compressed_data process_pixels rand generate_compressed_data process_pixels rand _process_vector_observation generate_list_agent_proto enumerate generate_compressed_proto_obs rand extend AgentInfoProto _process_visual_observation generate_uncompressed_proto_obs generate_compressed_proto_obs rand AgentInfoProto extend list sort CONTINUOUS agent_id BehaviorSpec steps_from_proto generate_list_agent_proto range BehaviorSpec steps_from_proto DISCRETE generate_list_agent_proto action_mask BehaviorSpec steps_from_proto DISCRETE generate_list_agent_proto action_mask BehaviorSpec steps_from_proto DISCRETE generate_list_agent_proto action_mask CONTINUOUS BehaviorSpec steps_from_proto generate_list_agent_proto action_mask BrainParametersProto behavior_spec_from_proto extend CONTINUOUS generate_list_agent_proto BehaviorSpec CONTINUOUS generate_list_agent_proto BehaviorSpec generate_side_channel_messages process_side_channel_message send_int IntChannel FloatPropertiesChannel process_side_channel_message generate_side_channel_messages get_property set_property uuid4 process_side_channel_message generate_side_channel_messages RawBytesChannel send_raw_data get_and_clear_received_messages len buffer read_bool append write_bool IncomingMessage range OutgoingMessage buffer write_int32 read_int32 IncomingMessage OutgoingMessage IncomingMessage write_float32 buffer read_float32 OutgoingMessage read_string write_string buffer IncomingMessage OutgoingMessage IncomingMessage buffer OutgoingMessage read_float32_list write_float32_list set_configuration channel_id EngineConfigurationChannel generate_side_channel_messages process_side_channel_message set_configuration_parameters RawBytesChannel read_float32 read_int32 IncomingMessage get_and_clear_received_messages default_config channel_id generate_side_channel_messages process_side_channel_message read_string set_float_parameter RawBytesChannel read_float32 read_int32 IncomingMessage EnvironmentParametersChannel IncomingMessage write_float32 write_string buffer write_int32 get_and_reset_stats on_message_received StatsSideChannel OutgoingMessage DecisionSteps action_mask empty BehaviorSpec TerminalSteps empty BehaviorSpec BehaviorSpec create_random_action enumerate BehaviorSpec create_empty_action set_gauge TimerStack startswith print find_packages find validate_packages remove replace frozenset endswith set add walk print git_ls_files get_release_tag check_all_files compile join print extract_version_string set values join format set_academy_version_string print set_package_version set_extension_package_version enumerate split print
<img src="docs/images/image-banner.png" align="middle" width="3000"/> # Unity ML-Agents Toolkit [![docs badge](https://img.shields.io/badge/docs-reference-blue.svg)](https://github.com/Unity-Technologies/ml-agents/tree/release_5_docs/docs/) [![license badge](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE) ([latest release](https://github.com/Unity-Technologies/ml-agents/releases/tag/latest_release)) ([all releases](https://github.com/Unity-Technologies/ml-agents/releases)) **The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents. Agents can be trained using reinforcement learning, imitation learning, neuroevolution, or other machine learning methods through a
1,919
dingyiming0427/goalgail
['imitation learning']
['Goal-conditioned Imitation Learning']
baselines/her/experiment/play.py rllab/optimizers/first_order_optimizer.py scripts/print_params.py rllab/policies/categorical_gru_policy.py baselines/common/vec_env/__init__.py sandbox/envs/pick_n_place/fetch_env_twoobj.py sandbox/envs/goal_env.py baselines/common/policies.py baselines/common/tests/test_mnist.py plotting/gail_plot.py sandbox/envs/maze/maze_ant/ant_maze_start_env.py rllab/regressors/__init__.py baselines/common/tests/test_cartpole.py baselines/common/mpi_adam_optimizer.py rllab/envs/box2d/parser/__init__.py rllab/policies/gaussian_mlp_policy.py rllab/regressors/product_regressor.py rllab/distributions/diagonal_gaussian.py rllab/mujoco_py/mjviewer.py rllab/algos/cma_es.py rllab/q_functions/base.py rllab/misc/resolve.py sandbox/envs/maze/maze_ant/swimmer_env.py rllab/mujoco_py/glfw.py baselines/common/tests/test_env_after_learn.py rllab/baselines/base.py rllab/envs/mujoco/maze/point_maze_env.py sandbox/envs/action_limited_env.py rllab/misc/viewer2d.py sandbox/logging/visualization.py baselines/common/models.py baselines/common/__init__.py sandbox/envs/maze/maze_env_utils.py sandbox/experiments/goals/maze_lego/maze_lego_her_gail.py rllab/plotter/plotter.py rllab/regressors/categorical_mlp_regressor.py rllab/spaces/base.py baselines/common/vec_env/shmem_vec_env.py rllab/algos/trpo.py baselines/common/tests/test_doc_examples.py rllab/exploration_strategies/gaussian_strategy.py sandbox/envs/init_sampler/base.py sandbox/envs/maze/maze_swim/swimmer_env.py rllab/mujoco_py/__init__.py baselines/common/mpi_moments.py rllab/distributions/base.py sandbox/experiments/goals/pick_n_place/generate_expert_traj.py rllab/q_functions/continuous_mlp_q_function.py rllab/envs/normalized_env.py rllab/envs/sliding_mem_env.py rllab/regressors/gaussian_conv_regressor.py sandbox/envs/start_env.py rllab/envs/identification_env.py rllab/envs/mujoco/inverted_double_pendulum_env.py rllab/envs/mujoco/half_cheetah_env.py rllab/optimizers/penalty_lbfgs_optimizer.py rllab/mujoco_py/mjlib.py sandbox/utils.py baselines/common/running_stat.py rllab/misc/logger.py baselines/common/dataset.py rllab/envs/mujoco/gather/swimmer_gather_env.py rllab/optimizers/lbfgs_optimizer.py rllab/envs/mujoco/gather/gather_env.py sandbox/envs/rewards.py sandbox/experiments/goals/maze/maze_her_gail.py rllab/algos/vpg.py rllab/spaces/product.py rllab/envs/box2d/car_parking_env.py sandbox/algos/gail/train.py rllab/spaces/discrete.py sandbox/experiments/goals/pick_n_place/pnp_twoobj.py baselines/common/tests/test_schedules.py rllab/envs/mujoco/ant_env.py baselines/common/input.py rllab/misc/docker.py rllab/misc/krylov.py sandbox/envs/maze/point_maze_pos_env.py sandbox/envs/pick_n_place/pick_and_place_twoobj.py rllab/distributions/delta.py rllab/algos/nop.py rllab/envs/box2d/box2d_viewer.py scripts/run_experiment_lite.py rllab/core/lasagne_helpers.py sandbox/logging/logger.py sandbox/envs/maze/maze_ant/ant_env.py rllab/misc/tensor_utils.py rllab/viskit/core.py rllab/baselines/gaussian_mlp_baseline.py rllab/mujoco_py/mjcore.py baselines/common/tests/test_serialization.py rllab/envs/box2d/double_pendulum_env.py sandbox/experiments/goals/maze_lego/expert.py rllab/envs/mujoco/point_env.py sandbox/experiments/goals/pick_n_place/generate_expert_traj_twoobj.py rllab/algos/ppo.py rllab/policies/deterministic_mlp_policy.py rllab/plotter/__init__.py baselines/common/atari_wrappers.py rllab/misc/instrument2.py rllab/viskit/__init__.py baselines/run.py sandbox/experiments/goals/maze/expert/maze_expert.py sandbox/logging/html_report.py sandbox/state/generator.py baselines/common/console_util.py scripts/submit_gym.py baselines/common/cmd_util.py baselines/common/filters.py rllab/envs/noisy_env.py scripts/sim_env.py rllab/envs/mujoco/gather/point_gather_env.py rllab/core/lasagne_powered.py rllab/misc/console.py sandbox/envs/maze/maze_ant/ant_target_env.py baselines/common/mpi_running_mean_std.py baselines/common/tests/util.py baselines/her/rollout.py rllab/exploration_strategies/ou_strategy.py sandbox/experiments/goals/pick_n_place/pnp_expert.py baselines/common/tf_util.py baselines/common/identity_env.py baselines/common/tile_images.py baselines/her/her.py rllab/core/serializable.py rllab/envs/mujoco/gather/embedded_viewer.py rllab/policies/base.py sandbox/envs/maze/maze_env.py sandbox/envs/maze/point_pos_env.py sandbox/envs/maze/maze_swim/swim_maze_env.py rllab/policies/categorical_conv_policy.py sandbox/state/evaluator.py baselines/common/mpi_adam.py rllab/envs/mujoco/maze/maze_env.py rllab/distributions/recurrent_categorical.py rllab/optimizers/hessian_free_optimizer.py baselines/common/vec_env/vec_normalize.py rllab/optimizers/minibatch_dataset.py baselines/common/tests/test_fixed_sequence.py rllab/envs/box2d/cartpole_swingup_env.py baselines/her/experiment/config.py sandbox/envs/pick_n_place/pick_and_place_ontable.py baselines/common/tests/envs/fixed_sequence_env.py rllab/misc/overrides.py rllab/mujoco_py/mjtypes.py rllab/exploration_strategies/base.py rllab/algos/reps.py rllab/misc/nb_utils.py sandbox/envs/maze/maze_ant/ant_maze_env.py sandbox/logging/__init__.py rllab/algos/npo.py baselines/common/runners.py rllab/envs/mujoco/walker2d_env.py baselines/common/tests/test_segment_tree.py baselines/common/tests/envs/mnist_env.py rllab/core/network.py scripts/record_video.py rllab/viskit/frontend.py rllab/optimizers/conjugate_gradient_optimizer.py sandbox/envs/maze/feasible_states/generate_feasible_states.py rllab/config.py rllab/core/lasagne_layers.py rllab/envs/box2d/cartpole_env.py baselines/her/ddpg.py rllab/baselines/gaussian_conv_baseline.py sandbox/experiments/goals/maze/maze_her_gail_algo.py scripts/setup_ec2_for_rllab.py baselines/common/cg.py baselines/her/util.py rllab/envs/gym_env.py baselines/common/vec_env/test_vec_env.py rllab/envs/box2d/mountain_car_env.py sandbox/envs/maze/feasible_states/simple_path_planner.py rllab/algos/ddpg.py rllab/distributions/bernoulli.py baselines/results_plotter.py rllab/envs/mujoco/maze/ant_maze_env.py rllab/sampler/base.py sandbox/experiments/goals/pick_n_place/pnp.py rllab/envs/box2d/pendulum_env.py baselines/common/math_util.py sandbox/envs/maze/maze_lego/point_lego_env.py rllab/algos/batch_polopt.py rllab/spaces/box.py scripts/sim_policy.py rllab/misc/ext.py baselines/common/misc_util.py sandbox/envs/base.py sandbox/experiments/goals/maze_lego/maze_her_gail_lego_algo.py rllab/envs/mujoco/hopper_env.py rllab/envs/box2d/parser/xml_box2d.py rllab/envs/box2d/box2d_env.py rllab/envs/env_spec.py baselines/her/experiment/config_backup.py baselines/common/mpi_fork.py rllab/algos/cem.py baselines/common/vec_env/vec_frame_stack.py baselines/common/vec_env/util.py rllab/envs/box2d/parser/xml_attr_types.py baselines/logger.py rllab/distributions/recurrent_diagonal_gaussian.py rllab/envs/mujoco/gather/ant_gather_env.py rllab/baselines/linear_feature_baseline.py baselines/common/tests/test_identity.py rllab/algos/tnpg.py rllab/policies/uniform_control_policy.py rllab/regressors/gaussian_mlp_regressor.py rllab/envs/mujoco/maze/swimmer_maze_env.py rllab/misc/mako_utils.py rllab/sampler/utils.py sandbox/envs/maze/maze_ant/swim_maze_env.py sandbox/envs/maze/maze_lego/maze_lego.py baselines/common/segment_tree.py baselines/common/distributions.py rllab/distributions/categorical.py rllab/envs/proxy_env.py rllab/envs/mujoco/simple_humanoid_env.py rllab/mujoco_py/mjconstants.py rllab/sampler/parallel_sampler.py rllab/envs/mujoco/swimmer_env.py baselines/common/vec_env/dummy_vec_env.py baselines/common/vec_env/subproc_vec_env.py rllab/spaces/__init__.py baselines/common/mpi_util.py rllab/envs/base.py rllab/envs/mujoco/maze/maze_env_utils.py rllab/algos/erwr.py baselines/common/tests/envs/identity_env.py baselines/her/normalizer.py rllab/algos/cma_es_lib.py rllab/envs/mujoco/mujoco_env.py rllab/mujoco_py/mjextra.py baselines/her/actor_critic.py baselines/common/tests/test_tf_util.py rllab/misc/autoargs.py rllab/misc/instrument.py rllab/mujoco_py/util.py rllab/baselines/zero_baseline.py rllab/envs/grid_world_env.py baselines/her/experiment/plot.py baselines/her/rollout_backup.py rllab/envs/mujoco/humanoid_env.py sandbox/envs/maze/point_env.py sandbox/experiments/goals/pick_n_place/pnp_algo.py baselines/her/replay_buffer.py plotting/plot.py rllab/policies/categorical_mlp_policy.py rllab/optimizers/hf.py rllab/misc/special.py rllab/algos/base.py sandbox/algos/gail/gail.py sandbox/logging/inner_logger.py baselines/common/running_mean_std.py rllab/core/parameterized.py sandbox/envs/maze/point_maze_env.py baselines/her/experiment/train.py rllab/misc/tabulate.py sandbox/experiments/goals/pick_n_place/pnp_twoobj_algo.py rllab/policies/gaussian_gru_policy.py rllab/config_personal_template.py sandbox/state/utils.py baselines/common/retro_wrappers.py baselines/common/schedules.py sandbox/envs/maze/feasible_states/linearized_feasible_states.py rllab/sampler/stateful_pool.py sandbox/envs/maze/maze_evaluate.py baselines/common/vec_env/vec_monitor.py rllab/algos/util.py sandbox/envs/goal_start_env.py sandbox/envs/pick_n_place/pick_n_place_gym.py scripts/sync_s3.py rllab/envs/box2d/parser/xml_types.py dumpkvs HumanOutputFormat SeqWriter get_dir read_json warn set_level Logger CSVOutputFormat log logkvs make_output_format JSONOutputFormat read_tb getkvs configure TensorBoardOutputFormat debug _configure_default_logger logkv info KVWriter _demo error ProfileKV scoped_configure logkv_mean reset profile read_csv plot_results rolling_window window_func ts2xy main plot_curves build_env get_learn_function_defaults parse get_default_network get_env_type main get_alg_module train get_learn_function WarpFrame LazyFrames make_atari FireResetEnv EpisodicLifeEnv ScaledFloatFrame wrap_deepmind NoopResetEnv FrameStack MaxAndSkipEnv ClipRewardEnv cg common_arg_parser atari_arg_parser make_robotics_env mujoco_arg_parser arg_parser parse_unknown_args make_vec_env robotics_arg_parser make_mujoco_env fmt_row print_cmd get_git_commit colorize timed ccap fmt_item Dataset iterbatches MultiCategoricalPd BernoulliPd Pd test_probtypes DiagGaussianPdType BernoulliPdType CategoricalPdType shape_el DiagGaussianPd validate_probtype make_pdtype MultiCategoricalPdType PdType CategoricalPd Filter IdentityFilter StackFilter ZFilter FlattenFilter CompositionFilter AddClock DivFilter Ind2OneHotFilter IdentityEnv encode_observation observation_placeholder observation_input test_discount_with_boundaries explained_variance_2d explained_variance flatten_arrays ncc discount_with_boundaries unflatten_vector discount pickle_load RunningAvg boolean_flag set_global_seeds EzPickle pretty_eta relatively_safe_pickle_dump zipsame unpack get_wrapper_by_name mlp cnn_small nature_cnn conv_only lstm cnn_lstm get_network_builder _normalize_clip_observation cnn register cnn_lnlstm MpiAdam test_MpiAdam MpiAdamOptimizer mpi_fork _helper_runningmeanstd mpi_moments mpi_mean test_runningmeanstd test_dist RunningMeanStd test_runningmeanstd dict_gather sync_from_root gpu_count share_file setup_mpi_gpus get_local_rank_size PolicyWithValue build_policy _normalize_clip_observation AppendTimeout RewardScaler wrap_deepmind_retro AllowBacktracking Downsample PartialFrameStack Rgb2gray TimeLimit StochasticFrameSkip StartDoingRandomActionsWrapper make_retro MovieRecord SonicDiscretizer AbstractEnvRunner update_mean_var_count_from_moments RunningMeanStd test_tf_runningmeanstd TfRunningMeanStd profile_tf_runningmeanstd test_runningmeanstd test_running_stat RunningStat linear_interpolation Schedule ConstantSchedule PiecewiseSchedule LinearSchedule SegmentTree MinSegmentTree SumSegmentTree function GetFlat _check_shape display_var_info save_variables huber_loss single_threaded_session save_state load_variables lrelu initialize get_placeholder numel conv2d intprod SetFromFlat make_session get_available_gpus switch flattenallbut0 normc_initializer adjust_shape in_session load_state get_placeholder_cached _squeeze_shape _Function get_session launch_tensorboard_in_background var_shape flatgrad tile_images test_cartpole test_lstm_example test_env_after_learn test_fixed_sequence test_discrete_identity test_continuous_identity test_mnist test_piecewise_schedule test_constant_schedule test_prefixsum_idx2 test_tree_set_overlap test_max_interval_tree test_prefixsum_idx test_tree_set test_serialization _serialize_variables _get_action_stats test_multikwargs test_function reward_per_episode_test simple_test rollout FixedSequenceEnv DiscreteIdentityEnv IdentityEnv BoxIdentityEnv MnistEnv DummyVecEnv _subproc_worker ShmemVecEnv worker SubprocVecEnv test_vec_env SimpleEnv assert_envs_equal obs_space_info obs_to_dict copy_obs_dict dict_to_obs VecFrameStack VecMonitor VecNormalize VecEnvWrapper AlreadySteppingError VecEnv NotSteppingError CloudpickleWrapper ActorCritic dims_to_shapes DDPG make_sample_her_transitions perturb Normalizer IdentityNormalizer ReplayBuffer RolloutWorker reward_fun RolloutWorker convert_episode_to_batch_major store_args import_function install_mpi_excepthook transitions_in_episode_batch flatten_grads mpi_fork reshape_for_broadcasting nn configure_dims log_params configure_her prepare_params cached_make_env simple_goal_subtract configure_ddpg configure_dims log_params configure_her prepare_params cached_make_env simple_goal_subtract configure_ddpg main pad load_results smooth_reward_curve mpi_average main train launch gail_plot get_seeds load_exps_data plot_with_std get_selector load_progress flatten_dict load_params smooth_data RLAlgorithm Algorithm BatchSampler BatchPolopt CEM _worker_rollout_policy CMAES sample_return CMAAdaptSigmaNone CMAAdaptSigmaCSA BoundPenalty BoxConstraintsLinQuadTransformation CMAAdaptSigmaBase _test MetaParameters CMAOptions DerivedDictBase _CMAStopDict _fileToMatrix SolutionDict NoiseHandler fmin show process_doctest_output unitdoctest FitnessFunctions rglen CMAAdaptSigmaTPA CMASolutionDict BestSolution ElapsedTime pprint CMAAdaptSigmaDistanceProportional ConstRandnShift is_feasible GenoPheno CMADataLogger plot OOOptimizer BoxConstraintsTransformationBase _CMAParameters FFWrapper Sections main CMAAdaptSigmaMedianImprovement _BoxConstraintsTransformationTemplate Rotation BoundaryHandlerBase _BlancClass _Error Misc _print_warning disp BoundTransform BaseDataLogger BoundNone felli CMAEvolutionStrategy parse_update_method SimpleReplayPool DDPG ERWR NOP NPO PPO REPS TNPG TRPO test_memory_usage_ok shift_advantages_to_positive simple_tests sign speed_tests max_size_tests ReplayPool center_advantages main trivial_tests VPG Baseline GaussianConvBaseline GaussianMLPBaseline LinearFeatureBaseline ZeroBaseline get_output get_full_output BatchNormLayer ParamLayer OpLayer batch_norm LasagnePowered GRULayer ConvNetwork MLP GRUNetwork GRUStepLayer wrapped_conv suppress_params_loading Parameterized Serializable Distribution Bernoulli from_onehot Categorical Delta DiagonalGaussian RecurrentCategorical Env Step EnvSpec GridWorldEnv NoVideoSchedule FixedIntervalVideoSchedule CappedCubicVideoSchedule convert_gym_space GymEnv IdentificationEnv DelayedActionEnv NoisyObservationEnv NormalizedEnv ProxyEnv SlidingMemEnv Box2DEnv PygameDraw Box2DViewer CartpoleEnv CartpoleSwingupEnv CarParkingEnv DoublePendulumEnv MountainCarEnv PendulumEnv Int List Tuple Angle String Float Choice Bool Hex Type Either XmlBox2D find_body XmlFixture XmlBody find_joint XmlJoint XmlState XmlControl ExtraData world_from_xml XmlWorld _get_name XmlChildren _extract_type XmlElem AttrDecl XmlChild XmlAttr AntEnv smooth_abs HalfCheetahEnv HopperEnv HumanoidEnv InvertedDoublePendulumEnv MujocoEnv q_mult q_inv PointEnv SimpleHumanoidEnv SwimmerEnv smooth_abs Walker2DEnv AntGatherEnv EmbeddedViewer GatherViewer GatherEnv PointGatherEnv SwimmerGatherEnv AntMazeEnv MazeEnv plot_state line_intersect point_distance ray_segment_intersect plot_ray construct_maze PointMazeEnv SwimmerMazeEnv ExplorationStrategy GaussianStrategy OUStrategy arg inherit _get_prefix new_from_args get_all_parameters _t_or_f add_args prefix _get_info SimpleMessage tweakfun colorize type_hint tweakval tweak prefix_log tee_log collect_args mkdir_p query_yes_no Message log _rllab_root docker_build docker_run exec_cmd docker_push extract delete scanr flatten truncate_path print_lasagne_layer sliced_fun set_seed compact new_tensor_like compile_function new_tensor unflatten_tensor_variables get_seed AttrDict path_len is_iterable lazydict flatten_tensor_variables cached_function concat_paths flatten_shape_dim stdize shuffled iterate_minibatches_generic iscanl iscanr using_seed flatten_hessian scanl extract_dict to_lab_kube_pod StubAttr upload_file_to_s3 to_local_command StubBase concretize query_yes_no _shellquote BinaryOp run_experiment_lite to_docker_command s3_sync_code variant stub _to_param_val VariantGenerator launch_ec2 ensure_dir StubMethodCall StubClass dedent StubObject VariantDict to_lab_kube_pod StubAttr upload_file_to_s3 to_local_command StubBase concretize query_yes_no _shellquote BinaryOp run_experiment_lite to_docker_command s3_sync_code variant stub _to_param_val VariantGenerator ensure_dir make_docker_image StubMethodCall StubClass dedent StubObject VariantDict preconditioned_cg tridiagonal_eigenvalues test_cg cg test_lanczos lanczos lanczos2 make_tridiagonal get_snapshot_gap enable_tabular remove_text_output _add_output get_snapshot_dir log_parameters get_snapshot_mode get_disable_prefix set_snapshot_gap save_itr_params log set_snapshot_dir tabular_prefix prefix set_disable_prefix pop_tabular_prefix push_prefix enable set_tf_summary_dir remove_tabular_output get_tf_summary_writer pop_prefix add_text_output hold_tabular_output get_tf_summary_dir MyEncoder get_log_tabular_only _remove_output stub_to_json log_parameters_lite set_snapshot_mode set_log_tabular_only add_tabular_output push_tabular_prefix disable TerminalTablePrinter record_tabular log_variant set_tf_summary_writer record_tabular_misc_stat disable_tabular dump_tabular compute_rect_vertices Experiment plot_experiments ExperimentDatabase uniq _get_base_class _get_base_classes overrides _get_base_class_names load_class locate_with_hint classesinmodule weighted_sample_n discount_cumsum from_onehot_n discount_return cat_entropy weighted_sample explained_variance_1d rk4 to_onehot cat_perplexity to_onehot_n softmax to_onehot_sym softmax_sym normalize_updates from_onehot _pipe_segment_with_colons _visible_width _pipe_line_with_colons _column_type _latex_line_begin_tabular _build_simple_row _strip_invisible _align_header _mediawiki_row_with_attrs _format_table _more_generic _isint _build_row _build_line _normalize_tabular_data _pad_row simple_separated_format _format _type tabulate _afterpoint _padboth _align_column _isnumber _padright _isconvertible _padleft stack_tensor_dict_list concat_tensor_list_subsample flatten_first_axis_tensor_dict concat_tensor_list concat_tensor_dict_list stack_tensor_list concat_tensor_dict_list_subsample pad_tensor_dict truncate_tensor_dict split_tensor_dict_list truncate_tensor_list high_res_normalize pad_tensor unflatten_tensors pad_tensor_n flatten_tensors Viewer2D Colors default_window_hints get_video_mode set_framebuffer_size_callback set_gamma_ramp set_scroll_callback make_context_current get_input_mode set_window_pos_callback joystick_present get_proc_address set_window_size_callback get_version poll_events set_window_size window_hint get_key get_primary_monitor get_monitor_name set_time set_cursor_pos set_error_callback get_mouse_button get_joystick_axes _GLFWwindow destroy_window set_window_focus_callback init get_version_string get_window_size set_cursor_pos_callback _load_library wait_events set_clipboard_string _GLFWvidmode _GLFWgammaramp get_window_pos get_current_context set_window_user_pointer get_monitor_pos get_monitors get_clipboard_string get_monitor_physical_size _glfw_get_version set_window_title set_monitor_callback get_joystick_buttons hide_window set_window_iconify_callback create_window get_gamma_ramp get_time get_joystick_name set_input_mode iconify_window get_window_monitor get_window_attrib swap_buffers restore_window set_key_callback swap_interval get_video_modes _find_library_candidates _GLFWmonitor set_mouse_button_callback set_char_callback set_gamma get_framebuffer_size terminate set_cursor_enter_callback extension_supported set_window_close_callback show_window set_window_refresh_callback get_cursor_pos window_should_close set_window_pos get_window_user_pointer set_window_should_close register_license MjError MjData dict2 MjModel append_objects MJRRECT MjvObjectsWrapper MjvGeomWrapper MjvLightWrapper MjvOptionWrapper MjrContextWrapper MJSTATISTIC MJMODEL MjVisualWrapper MjContactWrapper MJVOPTION MjOptionWrapper MJVOBJECTS MJVISUAL MjDataWrapper MJROPTION MJCONTACT MjrOptionWrapper MjvCameraPoseWrapper MjModelWrapper MjrRectWrapper MJVGEOM MJRCONTEXT MJDATA MjStatisticWrapper MjvCameraWrapper MJVCAMERA MJVCAMERAPOSE MJOPTION MJVLIGHT MjViewer _glfw_error_callback String UserString MutableString ReturnString FiniteDifferenceHvp PerlmutterHvp ConjugateGradientOptimizer FirstOrderOptimizer HessianFreeOptimizer gauss_newton_product SequenceDataset hf_optimizer LbfgsOptimizer BatchDataset PenaltyLbfgsOptimizer update_plot init_plot init_worker _worker_start _shutdown_worker Policy StochasticPolicy CategoricalConvPolicy CategoricalGRUPolicy CategoricalMLPPolicy DeterministicMLPPolicy GaussianGRUPolicy GaussianMLPPolicy UniformControlPolicy QFunction ContinuousMLPQFunction CategoricalMLPRegressor GaussianConvRegressor GaussianMLPRegressor ProductRegressor Sampler BaseSampler _worker_terminate_task initialize _worker_set_seed set_seed _get_scoped_G _worker_populate_task populate_task _worker_collect_one_path _worker_init sample_paths terminate_task truncate_paths _worker_set_env_params _worker_set_policy_params _worker_run_each SharedGlobal ProgBarCounter _worker_run_map StatefulPool _worker_run_collect rollout Space Box Discrete Product hex_to_rgb extract_distinct_params smart_repr load_exps_data flatten lookup Selector unique load_progress flatten_dict load_params to_json check_nan plot_div reload_data parse_float_arg sliding_mean index make_plot make_plot_eps get_plot_instruction send_css send_js summary_name format_experiment_prefix AttrDict initialize_parallel_sampler set_env_no_gpu GAIL Discriminator mpi_average train relabel_zero_action add_noise_to_action ActionLimitedEnv StateGenerator FixedStateGenerator UniformStateGenerator ListStateGenerator UniformListStateGenerator update_env_state_generator StateAuxiliaryEnv generate_brownian_goals GoalExplorationEnv evaluate_goal_env generate_initial_goals get_goal_observation GoalEnv get_current_goal GoalStartExplorationEnv linear_threshold_reward gaussian_threshold_reward find_all_feasible_states generate_starts_alice StartExplorationEnv find_all_feasible_reject_states generate_starts_random check_feasibility parallel_check_feasibility generate_starts StartEnv brownian find_all_feasible_states_plotting generate_initial_inits InitEnv InitBase InitIdxEnv InitBaseAngle MazeEnv plot_state find_cell_idx line_intersect point_distance ray_segment_intersect plot_ray construct_maze sample_nearby_states get_policy sample_unif_feas normalize_according_to_max test_and_plot_policy plot_policy_values plot_policy_means test_policy maze_context test_policy_parallel plot_path my_square_scatter plot_heatmap tile_space plot_discriminator_zero_action main find_empty_spaces unwrap_maze plot_discriminator_heatmap plot_q_func plot_discriminator_values PointEnv PointMazeEnv PointMazeEnv PointEnv main generate_feasible_states get_midpoints plan get_next_midpoint_room get_midpoints_room get_next_state get_block interpolate set_goal get_locations get_ele AntEnv AntMazeEnv AntMazeEnv AntEnv SwimmerEnv SwimmerMazeEnv LegoMazeEnv PointLegoEnv SwimmerEnv SwimmerMazeEnv goal_distance FetchEnv FetchPickAndPlaceEnv FetchPickAndPlaceEnv PnPEnv convert_gym_space run_task MazeExpert PointLegoExpert clip_action run_task main goToGoal collect_demos goToGoal noisify_action run_task clip_action PnPExpert PnPExpertTwoObj run_task HTMLReport format_dict format_experiment_log_path InnerExperimentLogger make_log_dirs format_experiment_log_path make_log_dirs ExperimentLogger plot_policy_reward plot_labeled_samples plot_line_graph plot_gan_samples plot_labeled_states save_image plot_bounds evaluate_path convert_label evaluate_state evaluate_state_env goal_reached_by_eps label_states disable_cuda_initializer label_states_from_paths compute_rewards_from_paths evaluate_states FunctionWrapper compute_labels parallel_map StateGAN StateGenerator CrossEntropyStateGenerator sample_matrix_row SmartStateCollection StateCollection to_img run_experiment get_subnets_info setup setup_ec2 setup_s3 write_config query_yes_no setup_iam to_onehot visualize_env sample_action makedirs items list logkv log log log log join int strftime gettempdir getenv Logger split makedirs CURRENT configure close log DEFAULT configure dumpkvs debug logkv_mean rmtree set_level logkv info exists join sorted defaultdict value isdir glob keys empty nan startswith append step max enumerate summary_iterator strides rolling_window func cumsum arange values len plot xlabel ylabel tight_layout mean window_func scatter title figure xlim max enumerate append load_results plot_curves show dirs add_argument num_timesteps plot_results xaxis ArgumentParser parse_args task_name seed int update format get_learn_function_defaults build_env learn print get_default_network get_env_type alg num_timesteps network get_learn_function env seed get_session wrap_deepmind_retro make_atari cpu_count get_dir VecFrameStack get_env_type wrap_deepmind alg make_vec_env make_retro VecNormalize Monitor ConfigProto env items list join import_module get_alg_module build_env configure save_path close log parse_known_args render reset save play expanduser train step Get_rank common_arg_parser NoopResetEnv make MaxAndSkipEnv WarpFrame EpisodicLifeEnv FireResetEnv ScaledFloatFrame FrameStack ClipRewardEnv callback zeros_like print copy dot f_Ax range set_global_seeds seed make set_global_seeds RewardScaler Monitor Get_rank seed make set_global_seeds Monitor FlattenDictWrapper print print add_argument arg_parser add_argument arg_parser join len str ndarray isinstance item abs append str print join colorize isinstance print_cmd check_call print colorize time asarray arange array_split tuple shuffle map Box isinstance MultiDiscrete Discrete MultiBinary seed size DiagGaussianPdType BernoulliPdType CategoricalPdType MultiCategoricalPdType validate_probtype array function entropy randn print param_placeholder sample_placeholder logp calcloglik size mean sqrt repeat sample kl pdfromflat std run observation_placeholder isinstance var var append reshape prod range zeros_like discount_with_boundaries array len list __next__ iter append range seed Get_rank helper add_argument replace Wrapper isinstance env rename activ conv_to_fc relu float32 conv cast max RunningMeanStd min mean clip_by_value std seed MpiAdam update function lossandgrad minimize Variable print astype square reduce_sum set_random_seed sin global_variables_initializer range run update copy check_call COMM_WORLD dtype asarray zeros_like size Allreduce ravel zeros sum asarray reshape square sqrt mpi_mean check_call COMM_WORLD seed concatenate print mpi_moments zipsame update initialize RunningMeanStd concatenate seed update initialize COMM_WORLD RunningMeanStd concatenate COMM_WORLD Bcast shape assign empty Get_rank run check_output COMM_WORLD str gpu_count get_local_rank_size node defaultdict allgather Barrier dirname bcast get_local_rank_size makedirs items list defaultdict allgather size mean append sum isinstance make TimeLimit StochasticFrameSkip FrameStack ScaledFloatFrame WarpFrame ClipRewardEnv square assert_allclose update TfRunningMeanStd assert_allclose concatenate update time format RunningMeanStd get_session print random mean TfRunningMeanStd range RunningStat randn mean append range push get_shape copy set_shape cast cond make_session get_default_session int ConfigProto cpu_count getenv update variables_initializer global_variables set run list _Function isinstance values as_list gradients placeholder name as_list prod info list_local_devices restore Saver warn get_default_session get_default_session warn any Saver dirname save makedirs dump any dirname run makedirs load isinstance assign zip append expanduser run array isinstance _squeeze_shape enumerate Popen int list asarray reshape transpose shape sqrt ceil float array update reward_per_episode_test copy DummyVecEnv learn close SubprocVecEnv reset make_session get_learn_function update simple_test update simple_test update simple_test update simple_test get_learn_function PiecewiseSchedule range ConstantSchedule SumSegmentTree SumSegmentTree SumSegmentTree SumSegmentTree MinSegmentTree update partial copy DummyVecEnv get_learn_function trainable_variables get_session run mean array std seed DummyVecEnv DummyVecEnv initial_state reset append step range recv _write_obs close render reset send step x recv close render reset send step x seed step_wait shape zip randint step_async array range klass assert_envs_equal DummyVecEnv dtype list items isinstance spaces shape append Dict isinstance sample_unif_feas wrapped_env only_feasible norm distance_metric callable getfullargspec update list kwonlydefaults dict zip defaults import_module getattr split dense reshape activation enumerate excepthook install_mpi_excepthook swapaxes list keys copy shape get_shape len make_env dict sorted format keys info make_sample_her_transitions reset cached_make_env update configure_her copy reset DDPG items list reshape reset cached_make_env sample step array reset cached_make_env _max_episode_steps cached_make_env DEFAULT_PARAMS update seed configure_dims generate_rollouts log_params set_global_seeds RolloutWorker prepare_params mean clear_history record_tabular logs range dump_tabular int ones_like convolve ones ceil len genfromtxt reshape enumerate append max ones concatenate clear_history update_target_net argmax log Bcast std uniform append sum range Get_rank dump_tabular mpi_average generate_rollouts copy mean logs T time store_episode extend record_tabular array len DEFAULT_PARAMS update seed configure configure_dims set_global_seeds log_params RolloutWorker prepare_params exit get_dir warn mpi_fork train configure_ddpg __enter__ Get_rank makedirs launch xlabel plot_with_std add_subplot ylabel figure legend xlim ones sum eval convolve std plot print min mean fill_between array join list sorted input print dict type eval load_progress append load_params AttrDict keys dict items list isinstance dict items list where extract print load_exps_data get_selector Selector len discount_cumsum sum standard_normal rollout set_param_values flatten env policy len discount_cumsum sum rollout set_param_values policy env ion print __doc__ __doc__ countevals CMAOptions NoiseHandler localtime floor opts N get_evaluations sent_solutions f BestSolution add uniform popsize asctime append sum objective_function update CMADataLogger plot tell copy set mean pheno complement eval ask_and_eval print_warning result_pretty best check_attributes print min disp CMAEvolutionStrategy x isinstance list print readlines map append split print testmod print input startswith elli fmin round process_doctest_output argv setup ones testmod input plot eval __doc__ listdir stdout remove time isinstance print len seed print random ReplayPool randint add_sample range random_batch time last_concat_state print random ReplayPool randint add_sample range add_sample array ReplayPool print last_concat_state print random ReplayPool assert_array_almost_equal randint add_sample range random_batch time print memory_usage random ReplayPool add_sample range speed_tests max_size_tests simple_tests update hasattr as_theano_expression isinstance dict get_full_output_for get_all_layers get_output_for BatchNormLayer NonlinearityLayer getattr identity dict pop zeros nonzero Discrete Box isinstance Tuple property isinstance userData to_box2d from_xml fromstring ExtraData isinstance line_intersect ones tolist arange diag MAZE_STRUCTURE get_ori subplots grid _find_robot list set_title scatter range _sensor_span plot astype MAZE_SIZE_SCALING set zeros print pcolor _n_bins array len MAZE_STRUCTURE get_ori subplots get_snapshot_dir grid _find_robot list get_current_maze_obs set_title scatter savefig range _sensor_span plot astype MAZE_SIZE_SCALING close set zeros join reset pcolor _n_bins array len issubclass hasattr __init__ hasattr isinstance __init__ upper getargspec items list hasattr _get_prefix __init__ dict getattr zip _get_info ismethod makedirs print flush open join split Callable isinstance items list replace collect_args log getargspec items list replace locate log __init__ dict collect_args lower getattr startswith zip __name__ lower write print join check_call join _rllab_root DOCKERFILE_PATH exec_cmd DOCKER_IMAGE exec_cmd DOCKER_IMAGE exec_cmd DOCKER_IMAGE isinstance isinstance expanduser mkdir_p Path exists f f pop copy function Message __enter__ __exit__ pop randint list len seed str set_rng RandomState print colorize set_random_seed seed get_state getstate set_state setstate list isinstance concatenate scan flatten append name print input_layer getattr __name__ list zip reshape broadcastable append prod patternbroadcast arange slice shuffle range len list items StubClass decode wait KUBE_DEFAULT_RESOURCES KUBE_DEFAULT_NODE_SELECTOR to_lab_kube_pod Popen str hasattr exit to_local_command call LOG_DIR sleep query_yes_no to_docker_command format replace s3_sync_code AWS_S3_PATH launch_ec2 ensure_dir pop join print dumps dict mode DOCKER_IMAGE makedirs isinstance pop items list isinstance print get pop list items PROJECT_PATH MUJOCO_KEY_PATH extend to_local_command dict DOCKER_LOG_DIR append decode request_spot_instances client upload_file_to_s3 getvalue resource pprint StringIO range get format FAST_CODE_SYNC MUJOCO_KEY_PATH create_tags pop print write create_instances dict dedent AWS_CODE_SYNC_S3_PATH LABEL decode str join FAST_CODE_SYNC print check_call flatten FAST_CODE_SYNC_IGNORES AWS_CODE_SYNC_S3_PATH hexdigest uuid4 join str AWS_CODE_SYNC_S3_PATH name close write check_call NamedTemporaryFile unlink encode get pop list format AWS_CODE_SYNC_S3_PATH join replace FAST_CODE_SYNC print extend AWS_ACCESS_KEY mkdir_p append DOCKER_CODE_DIR KUBE_PREFIX AWS_ACCESS_SECRET items list obj isinstance kwargs attr_name __stub_cache dict proxy_class getattr method_name args uuid4 str format docker_build docker_push DOCKER_IMAGE make_docker_image join mkdir_p DOCKER_CODE_DIR strip callback zeros_like print f_Minvx copy dot f_Ax range dot preconditioned_cg cg randn norm zeros_like print dot f_Ax append range norm print astype dot append zeros range enumerate zeros size make_tridiagonal arange randn print diag eigvalsh set_printoptions dot lanczos lanczos2 range make_tridiagonal append open mkdir_p dirname remove close append join _add_output _remove_output append _add_output remove _remove_output pop remove system list values colorize write now strftime tzlocal append append join join push_prefix push_tabular_prefix pop_tabular_prefix writerows log open list add DictWriter union close set writeheader nan keys flush pop DictReader items writerow dict print_tabular split join join get_snapshot_dir dump items list isinstance __module__ get_all_parameters dict any getattr mkdir_p dirname __name__ items list isinstance __module__ dict __name__ pop items list stub_to_json obj b64decode dict args_data loads mkdir_p dirname kwargs dump hasattr stub_to_json mkdir_p dirname max min average nan record_tabular median std join sorted basename glob print post_processing dirname abspath legend append array add set append int co_code ord getattr __dict__ join locate locate_with_hint isinstance cumsum sum cumsum sum rand len exp max var isclose zeros zeros asarray derivs arange len join conv hasattr isinstance _isint _strip_invisible _isnumber _isint _isnumber rfind isinstance list max map get max list hasattr map index _fields zip_longest names keys range values len get join list search map _normalize_tabular_data zip hasattr hasattr linebetweenrows datarow lineabove padding _build_line linebelow _pad_row linebelowheader _build_row append headerrow list prod map zeros_like zeros enumerate list isinstance dict pad_tensor keys list isinstance reshape dict shape keys list isinstance stack_tensor_list dict keys list isinstance concat_tensor_list_subsample dict keys list isinstance concat_tensor_list dict keys list isinstance zip keys items list isinstance dict truncate_tensor_list join basename all iglob endswith set add realpath startswith join path dirname abspath startswith strip Popen chdir glfwInit _getcwd glfwTerminate glfwGetVersion pointer c_int _GLFWerrorfun glfwSetErrorCallback pointer glfwGetMonitors c_int glfwGetMonitorPos pointer c_int pointer glfwGetMonitorPhysicalSize c_int glfwSetMonitorCallback _GLFWmonitorfun glfwGetVideoModes pointer c_int contents glfwSetGamma contents _GLFWgammaramp glfwSetGammaRamp wrap pointer glfwDefaultWindowHints glfwWindowHint value glfwDestroyWindow glfwSetWindowShouldClose glfwSetWindowTitle _to_char_p pointer glfwGetWindowPos c_int glfwSetWindowPos pointer glfwGetWindowSize c_int glfwSetWindowSize pointer glfwGetFramebufferSize c_int glfwIconifyWindow glfwRestoreWindow glfwShowWindow glfwHideWindow glfwSetWindowUserPointer glfwSetWindowPosCallback value _GLFWwindowposfun _GLFWwindowsizefun glfwSetWindowSizeCallback value glfwSetWindowCloseCallback _GLFWwindowclosefun value glfwSetWindowRefreshCallback value _GLFWwindowrefreshfun _GLFWwindowfocusfun value glfwSetWindowFocusCallback _GLFWwindowiconifyfun value glfwSetWindowIconifyCallback value _GLFWframebuffersizefun glfwSetFramebufferSizeCallback glfwPollEvents glfwWaitEvents glfwSetInputMode glfwGetCursorPos pointer c_double glfwSetCursorPos value _GLFWkeyfun glfwSetKeyCallback _GLFWcharfun value glfwSetCharCallback glfwSetMouseButtonCallback value _GLFWmousebuttonfun value glfwSetCursorPosCallback _GLFWcursorposfun _GLFWcursorenterfun glfwSetCursorEnterCallback value glfwSetScrollCallback value _GLFWscrollfun pointer glfwGetJoystickAxes c_int pointer glfwGetJoystickButtons c_int glfwSetClipboardString _to_char_p glfwSetTime glfwMakeContextCurrent glfwSwapBuffers glfwSwapInterval mj_activate range ngeom error classmethod list Rop grad map as_tensor_variable sum get_nowait rollout set_param_values join close put start Process register Queue put put run_each dict SharedGlobal worker_id loads _get_scoped_G _get_scoped_G getattr terminate run_each G _get_scoped_G log n_parallel run_each n_parallel set_seed log run_each _get_scoped_G set_param_values _get_scoped_G set_param_values _get_scoped_G policy rollout env run_each n_parallel pop items list truncate_tensor_dict dict truncate_tensor_list append sum len get put append G collect_once get_actions current_goal zeros_like flatten render transform_to_goal_space sleep get_action print items list isinstance __module__ dict __name__ hasattr split hasattr isinstance flatten sorted map unique list min array append max range len percentile50 numeric_list_to_string stds custom_x Figure list hasattr append range format plot means percentile0 mean percentile100 enumerate join print percentile25 Layout percentile75 Scatter len subplots percentile50 stds grid set_visible legendHandles list str set_linewidth savefig legend gca range plot means set_xlim enumerate percentile25 percentile75 fill_between len extract nanmedian where nanpercentile make_plot Selector custom_series_splitter round max clip str list sorted extract_distinct_params map make_plot_eps append AttrDict custom_filter asarray format product replace sliding_mean mean zip float enumerate items int print maximum dict nanmean filter nanstd std _filters len get get parse_float_arg eval loads get_plot_instruction args get_plot_instruction list sorted disable_variant extract_distinct_params data_paths load_exps_data set flatten initialize min cpu_count replace clip randn where deepcopy sample_transitions batch_size train_discriminator get_reward print wrapped_env hasattr hasattr hasattr FixedStateGenerator update_goal_generator choice shape uniform reset get_goal_observation append zeros get_action step array get_current_goal randn get_current_goal reset get_goal_observation append step flat_dim len log_diagnostics randn gauss uniform append array log AsymSelfplayBatch optimize_batch log zeros_like FunctionWrapper log parallel_map str tolist len shape uniform render sleep append format concatenate shuffle stack start_observation print extend reset get_action step n_parallel FunctionWrapper parallel_map zeros reset flat_dim step str plot_labeled_samples format concatenate add_text get_snapshot_dir size len parallel_check_feasibility sample OrderedDict generate_starts StateCollection save append log add_image start_observation uniform reset append get_action step format get_snapshot_dir size sample generate_starts StateCollection append log update print UniformStateGenerator reset StateCollection action_dim append zeros step update_init_selector FixedStateSelector convert2selector get_current_obs reset append get_action step int concatenate copy shape append zeros array range coord_to_struct index find_cell_idx min choice max LINEARIZED len load get_param_values system set_param_values wrapped_env unwrap_maze MAZE_SIZE_SCALING uniform find_empty_space array range append normal min add_patch autoscale ColorbarBase Normalize Rectangle zip jet make_axes float max set_xlim add_patch Rectangle zeros set_ylim show T subplots my_square_scatter scatter maze_context hasattr FixedStateGenerator update_goal_generator rollout relative_goal range mean pad wrapped_env array update_start_generator plot_path sample_nearby_states find_empty_spaces log append add_image set_xlim add_subplot scatter figure append save_image set_ylim enumerate hasattr wrapped_env array find_empty_space MAZE_SIZE_SCALING range append list size linspace zip append range init_goal_obs format time relative_goal mean evaluate_states append tile_space find_empty_spaces log format plot_heatmap mean test_policy wrapped_env plot_path save_image add_image append_goal_to_observation zeros_like add_subplot normalize_according_to_max save_image max show exp FixedStateGenerator scatter quiver append get_q get_actions current_goal relative_goal update_start_generator tile find_empty_spaces enumerate add_image norm reshape update_goal_generator quiverkey absolute include_goal_obs reset figure zeros array get_actions_means append_goal_to_observation add_subplot save_image FixedStateGenerator shape scatter quiver append range get_actions current_goal add_artist relative_goal set_alpha update_start_generator tile find_empty_spaces add_image norm print quiverkey update_goal_generator reset include_goal_obs figure zeros array get_actions Circle plot_heatmap add_patch get_reward mean uniform array tile zeros save_image find_empty_spaces range add_image norm quiverkey add_subplot get_reward scatter figure tile quiver save_image array add_image zeros_like quiverkey add_subplot get_reward scatter figure tile quiver save_image array add_image current_goal find_empty_spaces test_policy plot_heatmap get_policy sample_unif_feas PointMazeEnv load maze_id plot_labeled_samples generate_feasible_states shape array open array range coord_to_struct astype append get_next_midpoint_room get_block get_locations get_next_midpoint_room interpolate find_cell_idx reshape norm array get_midpoints get_midpoints_room extend interpolate zip get_snapshot_dir sample_unif_feas RolloutWorker get_dir logical_not StateCollection mpi_fork argmax __enter__ log new_row run seed DEFAULT_PARAMS set_global_seeds ReplayBuffer add_text global_variables tolist exit UniformStateGenerator HTMLReport initialize_variables GAIL normalize MazeExpert configure_ddpg plot_path Get_rank range dump_tabular append generate_rollouts format configure configure_dims configure_her concatenate prepare_params PointMazeEnv add_header evaluate_performance states join format_dict int log_params print store_episode dims_to_shapes make_env UniformListStateGenerator any array sample_transitions makedirs evaluate_performance_plane PointLegoEnv uniform PointLegoExpert make goToGoal copy render append step range len update goToGoal stack_tensor_dict_list print dict reset place_obj stack_tensor_dict_list current_goal noisify_action stack tile zeros array save PnPExpert evaluate_pnp reset record_tabular collect_demos PnPExpertTwoObj helper join format strftime dirname abspath log_dir experiment_data_dir report_dir plot_dir makedirs clf linspace max seek pcolormesh colorbar shape savefig meshgrid imread format hstack close mean print reshape min figure evaluate_states TemporaryFile seek close savefig imread TemporaryFile items list plot_labeled_samples format add_image OrderedDict convert_labels record_tabular sum keys len subplots set_ylim3d add_subplot list seek scatter savefig legend imread plot_bounds set_xlim close set choice set_xlim3d collect min add_patch set_zlim3d Rectangle figure zeros TemporaryFile set_ylim range plot copy seek set_ylim3d collect sample_states add_subplot close set_zlim3d ylim scatter savefig figure set_xlim3d xlim imread TemporaryFile seek plot close clf savefig figure imread TemporaryFile join close map set_start_method Pool n_parallel norm evaluate_path transform_to_start_space tuple append array items list evaluate_path transform_to_start_space tuple reshape mean append array compute_labels print reshape log evaluate_states compute_labels float32 astype log reshape OrderedDict ones_like ones FunctionWrapper parallel_map FixedStateGenerator update_goal_generator rollout relative_goal update_start_generator append sample_nearby_states array range log_diagnostics FunctionWrapper parallel_map aggregator randint choice remove_text_output get_snapshot_dir get_snapshot_mode params_log_file loads set_snapshot_gap method_call ArgumentParser exp_name seed variant_data initialize set_snapshot_dir set_seed variant_log_file strftime LOG_DIR init_worker concretize parse_args log_tabular_only is_iterable push_prefix plot snapshot_mode set_tf_summary_dir remove_tabular_output tzlocal resume_from pop_prefix text_log_file add_text_output load join log_dir log_parameters_lite b64decode set_snapshot_mode add_argument set_log_tabular_only now add_tabular_output args_data log_variant snapshot_gap use_cloudpickle train tabular_log_file add_role_to_instance_profile delete client all name exit resource Role query_yes_no detach_policy remove_role load put_role_policy print arn create_role create_instance_profile roles attach_policy print create_bucket client str list join all create_security_group get_subnets_info items print id create_tags resource authorize_ingress create_key_pair mkdir_p PROJECT_PATH client append dict OrderedDict client join print exit substitute PROJECT_PATH exists setup_ec2 print setup_s3 write_config setup_iam len pump hasattr isinstance window timestep action_from_keys set_key_callback poll_events get_pressed start_interactive render reset sleep sample zeros step range
# Goal-conditioned Imitation Learning ## Environment setup `conda env create -f environment.yaml` ## Run Experiment The following command will run the three experiments as in Fig. 3 in the paper for both four rooms env and Fetch Pick&Place env. Four rooms env: `python sandbox/experiments/goals/maze/maze_her_gail.py` Point mass lego pusher env: `python sandbox/experiments/goals/maze_lego/maze_lego_her_gail.py` Fetch Pick and Place env: `python sandbox/experiments/goals/pick_n_place/pnp.py` Fetch StackTwo env: `python sandbox/experiments/goals/pick_n_place/pnp_twoobj.py` ## Plot Learning Curves
1,920
diptamath/Nonhomogeneous_Image_Dehazing
['image dehazing']
['Fast Deep Multi-patch Hierarchical Network for Nonhomogeneous Image Dehazing']
DMSHN_test.py prepare_image_data.py DMSHN_train.py DMPHN_test.py DMPHN_train.py models.py datasets.py loss.py new_dataset/datalist.py NH_HazeDataset main save_images main weight_init save_dehazed_images main save_images main weight_init save_dehazed_images CustomLoss_function TVLoss Decoder Encoder save_image load str print load_state_dict listdir cuda makedirs str save_image fill_ ones size out_channels normal_ sqrt zero_ __name__ encoder_lv2 zero_grad DataLoader save exists StepLR custom_loss_fn decoder_lv2 Adam decoder_lv3 range cat state_dict encoder_lv1 size Encoder start_epoch NH_HazeDataset enumerate decoder_lv1 time backward Decoder system parameters encoder_lv3 step interpolate len item add_scalar
# Fast Deep Multi-patch Hierarchical Network for Nonhomogeneous Image Dehazing The code for implementing the "Fast Deep Multi-patch Hierarchical Network for Nonhomogeneous Image Dehazing" (Accepted at NTIRE Workshop, CVPR 2020). Preprint: https://arxiv.org/abs/2005.05999 ## Highlights - **Lightweight:** The proposed system is very lightweight as the total size of the model is around 21.7 MB. - **Robust:** it is quite robust for different environments with various density of the haze or fog in the scene. - **Fast:** it can process an HD image in 0.0145 seconds on average and can dehaze images from a video sequence in real-time. ## Getting Started For training, image paths for train, val and test data should be listed in text file (example. for image patch level traning, coresponding hazed and ground truth image paths are listed in text file with path `./new_dataset/train_patch_gt.txt`). Pretrained models are given in the `checkpoints2/DMSHN_1_2_4` and `checkpoints/DMPHN_1_2_4`path for demo. ### Prerequisites
1,921
dipu-bd/craft-moran-ocr
['scene text detection', 'scene text recognition']
['Character Region Awareness for Text Detection', 'A Multi-Object Rectified Attention Network for Scene Text Recognition']
src/craft/imgproc.py src/moran/models/morn.py src/data/create_mnt_list.py src/craft/basenet/vgg16_bn.py src/craft/refinenet.py src/moran/main.py src/moran/trainer.py src/recognizer.py src/moran/models/moran.py src/moran/inference.py src/moran/tools/utils.py test.py src/craft/craft_utils.py src/moran/models/fracPickup.py src/data/create_dataset.py src/moran/tools/dataset.py src/detector.py src/craft/craft.py src/moran/models/asrn_res.py src/moran/test.py main test _copyStateDict Detector Recognizer CRAFT double_conv warpCoord getDetBoxes_core getPoly_core adjustResultCoordinates getDetBoxes normalizeMeanVariance cvt2HeatmapImg resize_aspect_ratio loadImage denormalizeMeanVariance RefineNet init_weights vgg16_bn createDataset writeCache checkImageIsValid val trainBatch ResNet BidirectionalLSTM ASRN AttentionCell Attention Residual_block fracPickup MORAN MORN lmdbDataset randomSequentialSampler resizeNormalize averager loadData strLabelConverterForAttention get_torch_version main test _copyStateDict Detector Recognizer CRAFT double_conv warpCoord getDetBoxes_core getPoly_core adjustResultCoordinates getDetBoxes normalizeMeanVariance cvt2HeatmapImg resize_aspect_ratio loadImage denormalizeMeanVariance RefineNet init_weights vgg16_bn createDataset writeCache checkImageIsValid val trainBatch ResNet BidirectionalLSTM ASRN AttentionCell Attention Residual_block fracPickup MORAN MORN lmdbDataset randomSequentialSampler resizeNormalize averager loadData strLabelConverterForAttention get_torch_version load Recognizer imwrite Detector COLOR_BGR2GRAY print process imread cvtColor enumerate add_argument test ArgumentParser parse_args image_files join list items OrderedDict startswith str str matmul threshold roll max clip connectedComponentsWithStats argmin MORPH_RECT shape append minAreaRect range astype copy sqrt dilate int uint8 getStructuringElement reshape boxPoints min zeros array warpCoord line arange zeros inv float32 reversed shape array getPerspectiveTransform append median warpPerspective range enumerate len getPoly_core getDetBoxes_core len array range len COLOR_GRAY2RGB imread array cvtColor astype float32 uint8 astype copy shape max zeros resize applyColorMap uint8 astype COLORMAP_JET data isinstance fill_ Conv2d xavier_uniform_ normal_ zero_ BatchNorm2d Linear imdecode fromstring IMREAD_GRAYSCALE join print len encode writeCache range open data decode DataLoader max view add iter append encode next range cat BidirDecoder averager loadData size MORAN zip float criterion print min len criterion backward loadData MORAN zero_grad step encode next cat BidirDecoder copy_ get_torch_version split
# CRAFT-MORAN-OCR An OCR system using CRAFT for text detection and MORAN for recognition ## Inspiration - [CRAFT-pytorch](https://github.com/clovaai/CRAFT-pytorch): Official Pytorch implementation of CRAFT text detector | [Paper](https://arxiv.org/abs/1904.01941) | [Pretrained Model](https://drive.google.com/open?id=1Jk4eGD7crsqCCg9C9VjCLkMN3ze8kutZ) | [Supplementary](https://youtu.be/HI8MzpY8KMI) - [MORAN_v2](https://github.com/Canjie-Luo/MORAN_v2): MORAN is a network with rectification mechanism for general scene text recognition. The paper (accepted to appear in Pattern Recognition, 2019) in [arXiv](https://arxiv.org/abs/1901.03003),
1,922
disiji/bayesian-blackbox
['text classification']
['Active Bayesian Assessment for Black-Box Classifiers']
src/active_learning_topk_baselines.py src/data_utils.py src/plot/figure_reliability_comparison.py src/active_learning_topk_ttts.py src/plot/figure_scatter_accuracy_ece.py src/bayesian_reliability_comparison.py src/plot/figure_ece_posterior.py src/plot/figure_two_column_accuracy_ece.py src/active_learning_costs.py src/calibration.py src/active_learning_topk.py src/models.py src/utils.py src/plot/figure_cost.py src/plot/figure_reliability_diagrams.py src/plot/figure_active_ece.py src/plot/figure_active_accuracy.py src/sampling.py max_choice_fn random_choice_fn SuperclassDataset eval select_and_label main Dataset pretty_print main_calibration_error_topk main_accuracy_topk main_calibration_error_topk main_accuracy_topk main_calibration_error_topk main_accuracy_topk main NoCalibration OneVsRestCalibrator HistogramBinning BayesianBinningQuantiles IsotonicRegression PlattScaling CalibrationMethod _ConstantCalibrator TemperatureScaling get_ece_k get_bayesian_ground_truth get_confidence_k prepare_data get_ground_truth eval_ece train_holdout_split get_accuracy_k DirichletMultinomialCost BetaBernoulli Model ClasswiseEce SumOfBetaEce top_two_thompson_sampling random_sampling thompson_sampling bayesian_UCB epsilon_greedy get_samples_topk evaluate MpSafeSharedArray comparison_plot mean_reciprocal_rank _comparison_plot main main_informed plot_topk_accuracy main plot_topk_ece plot_comparison plot_cost_matrix plot_confusion plot_topk_cost main plot_ece_samples frequentist_bootstrap_ece main main plot_reliability_comparison main plot_bayesian_reliability_diagram main plot_scatter main hstripe plot_figure_1 arange shuffle choice_fn pop update enqueue shuffle confusion_matrix mpe sample zeros range len print join tolist shape zeros sum range len subplots arange pseudocount select_and_label save confusion_prior seed list num_classes ones tolist k savefig legend sum range fill_diagonal plot mkdir info zeros load join DirichletMultinomialCost output tqdm load_from_text superclass len arange get_confidence_k pseudocount save list ones len metric tolist comparison_plot range get_samples_topk get_ground_truth mkdir load T evaluate prepare_data output tqdm mode JoinableQueue arange put save dataset Process metric comparison_plot range get debug start mkdir info train_holdout_split load join get_bayesian_ground_truth prepare_data processes output mode len calibration_estimation_error update_batch weight_type savetxt SumOfBetaEce frequentist_eval shuffle stat mean eval zip prepare_data std frequentist_calibration_estimation_error num_runs genfromtxt list debug astype len zeros permutation len digitize absolute linspace inner sum array list DataFrame array zip list DataFrame array zip zeros range eval_ece get_ece_k zeros get_accuracy_k update_batch BetaBernoulli eval zeros ClasswiseEce len randrange set sample argsort append set binomial thompson_sampling set argsort eval append range len set argsort eval append range len seed pop topk update sample_fct BetaBernoulli shuffle zip append zeros ClasswiseEce BetaBernoulli tolist len update astype mean eval predict_proba zip zeros enumerate beta_params_mpe T reshape mode eval_ece mean_reciprocal_rank ClasswiseEce array fit arange plot xlabel yticks ylabel savefig figure legend xticks len mean metric _comparison_plot output argsort sum arange empty_like update int arange plot PercentFormatter min set_xlim copy index mean set_ticks set_major_formatter get_xlim tick_params set_ylim len savefig update int arange plot PercentFormatter min set_xlim copy index mean set_ticks set_major_formatter get_xlim tick_params set_ylim len update load arange plot PercentFormatter set_xlim copy set_ticks set_major_formatter get_xlim tick_params set_ylim len savefig savefig savefig items plot_cost_matrix plot_comparison plot_confusion append array update isinstance axvline set_xlim copy hist set_xticks arange update_batch choice zeros SumOfBetaEce range frequentist_eval len update set_xscale errorbar plot PercentFormatter set_xlabel set_yticks copy set_ticks set_major_formatter tick_params set_ylim set_yticklabels linspace list counts_per_bin bar twinx sum range update ppf errorbar plot set_xticklabels set_xlim copy get_params set_label_coords set_yticks set_xticks fill_between set_ylim update errorbar set_xlabel copy mean std set_size_inches tight_layout subplots_adjust set_ylabel delaxes update arange plot concatenate set_yticklabels set_yticks tolist FormatStrFormatter copy nan set_major_formatter empty set_ylim enumerate argsort T plot_figure_1 BetaBernoulli sample ClasswiseEce
Active Bayesian Assessment for Black-Box Classifiers === This repo contains an implementation of the active Bayesian assessment models described in "Active Bayesian Assessment for Black-Box Classifiers", Disi Ji, Robert L. Logan IV, Padhraic Smyth, Mark Steyvers. [[arXiv]](https://arxiv.org/pdf/2002.06532.pdf). Setup --- You will need Python 3.5+. Dependencies can be installed by running: ```{bash} pip install -r requirements.txt ```
1,923
diskhkme/VCONV_DAE_TF
['denoising']
['VConv-DAE: Deep Volumetric Shape Learning Without Object Labels']
train.py HDFGenerator.py Model.py TestCodes/VoxelVisualization_TestCode.py TestCodes/Autoencoder_TestCode.py GlobalParam.py Predict.py TrainValTextGenerator.py VoxelSampling.py TestCodes/DataGenerator_TestCode.py DataGenerator.py DataGenerator WriteHDF KNULoadTxt createHDF5Dataset ListUpFiles main build_model_64 build_model_30 build_model_128 build_model_64_deeper PrintVoxel VisualizeVolxel MakePrediction LoadFromHDF ConstructModel SqueezeAndBinarize LoadInput main Train main GenerateDataset ConstructModel main PrintText ListUpFiles TrainValidationSplit Downsample main ListUpFiles KNULoadTxt append listdir splitext int shuffle WriteHDF len format zoom print loadtxt reshape File astype close create_dataset enumerate len list readlines close map open array split createHDF5Dataset ListUpFiles Model Input Model Input Model Input Model Input write reshape from_dense astype gca show figure voxels squeeze clear_session TRAIN_OUTPUT_FOLDER multi_gpu_model build_model_64 SGD build_model_30 load_weights WEIGHT_FILE_NAME build_model_128 compile predict loadtxt expand_dims empty reshape expand_dims reshape empty File FROM_HDF BINARIZE_THRESHOLD PrintVoxel TRAIN_OUTPUT_FOLDER format print MakePrediction PREDICTION_FILE_PATH LoadFromHDF ConstructModel VAL_HDF_FILE_PATH SqueezeAndBinarize LoadInput PREDICTION_DATA_INDEX summary range LOAD_WEIGHT_PATH LOAD_WEIGHT build_model_64_deeper print format get_dataset_siez DataGenerator ModelCheckpoint EarlyStopping fit_generator CSVLogger GenerateDataset copyfile output_shape Train int shuffle len format write close open PrintText TrainValidationSplit zoom print loadtxt reshape astype savetxt Downsample
# VCONV_DAE_TF VCONV_DAE for Tensorflow ------------------------ * Reference Paper : https://arxiv.org/abs/1604.03755 * Reference GitHub Repository(Torch & Matlab) : https://github.com/Not-IITian/VCONV-DAE * Current Training Result of Reconstruction on ModelNet40 (30x30x30), Val_Loss(1.14E-05) <br><img src="Img/bathtub_te_1_input.png" width="450px" height="300px"></img><br/> <br><img src="Img/bathtub_te_1_output.png" width="450px" height="300px"></img><br/> <br><img src="Img/chair_te_1_input.png" width="450px" height="300px"></img><br/> <br><img src="Img/chair_te_1_output.png" width="450px" height="300px"></img><br/>
1,924
divamgupta/mtl_girnet
['sentiment analysis', 'part of speech tagging']
['GIRNet: Interleaved Multi-Task Recurrent State Sequence Models']
core/GIRNet.py exps_cmsenti.py exps_absa.py sequence_classification/sluice.py sequence_labeling/__init__.py target_based_classification/__init__.py sequence_classification/girnet.py data_prep/twtokenize.py sequence_labeling/xstitch.py target_based_classification/xstitch.py sequence_classification/Utils.py target_based_classification/Utils.py data_prep/prep_absa_datasets.py sequence_classification/SluiceUtils.py sequence_classification/xstitch.py sequence_labeling/sluice.py exps_postag.py data_prep/prep_postag_datasets.py sequence_classification/sharedprivate.py sequence_labeling/SluiceUtils.py sequence_labeling/Utils.py target_based_classification/hardshare.py sequence_classification/__init__.py sequence_labeling/sparedprivate.py sequence_labeling/hardshare.py sequence_classification/hardshare.py target_based_classification/sluice.py target_based_classification/lowsupshare.py sequence_labeling/girnet.py sequence_classification/lowsupervision.py target_based_classification/girnet.py target_based_classification/SluiceUtils.py data_prep/prep_cmsenti_datasets.py target_based_classification/sparedprivate.py target_based_classification/att_functions.py sequence_labeling/lowsup.py free_tf_mem action free_tf_mem action free_tf_mem action GIRNet InterleaveLSTMCells gloveDict getlaptop getrestraunt vecc vecc vecc tokenizeRawTweetText simpleTokenize addAllnonempty splitToken squeezeWhitespace splitEdgePunct regex_or tokenize normalizeTextForTagger GiretTwoCell GIRNet_SeqClass HardShare_SeqClass LowSup_SeqClass SharedPrivate_SeqClass Sluice_SeqClass OutSelctorInitBiases CrossStitch CrossSelectInitBiased OutPutSelector eval_class Trainer CrossStitch_SeqClass GiretTwoCell GIRNet_SeqLab HardShare_SeqLab LowSup_SeqLab Sluice_SeqLab OutSelctorInitBiases CrossStitch CrossSelectInitBiased OutPutSelector SharedPrivate_SeqLab eval_class Trainer CrossStitch_SeqLab reduce_via_attention sigmoid_with_len_l softmax_with_len_l reduce_mean_with_len GIRNet_ABSA reduce_mean_weighted reduce_mean_with_len sigmoid_with_len_l SkipStepCell HardShare_ABSA LowSupShare_ABSA desectOut Sluice_ABSA OutSelctorInitBiases CrossStitch CrossSelectInitBiased OutPutSelector SharedPrivate_ABSA get_fc_classifier eval_classification Trainer get_embed get_lstm eval_class get_laststep_lstm CrossStitch_ABSA reset_default_graph _SESSION close HardShare_ABSA free_tf_mem dict CrossStitch_ABSA GIRNet_ABSA SharedPrivate_ABSA train LowSupShare_ABSA Sluice_ABSA CrossStitch_SeqClass LowSup_SeqClass SharedPrivate_SeqClass GIRNet_SeqClass HardShare_SeqClass Sluice_SeqClass LowSup_SeqLab SharedPrivate_SeqLab Sluice_SeqLab GIRNet_SeqLab HardShare_SeqLab CrossStitch_SeqLab InterleaveLSTMCells list print map zip split list print map zip split list floatArr oneHotVec map padList split int64Arr len uint8 selectKeys to_categorical astype eval array sub addAllnonempty len splitEdgePunct append range finditer split append strip search replace unescape tokenize normalizeTextForTagger float recall_score precision_score f1_score accuracy_score round sequence_mask reshape float32 sigmoid shape reverse cast exp sequence_mask reshape reduce_max float32 reduce_sum shape reverse cast reshape float32 reduce_sum reverse cast int int Embedding File array print
# GIRNet: Interleaved Multi-Task Recurrent State Sequence Models Packaged datasets and Keras code for the paper [GIRNet: Interleaved Multi-Task Recurrent State Sequence Models](https://arxiv.org/abs/1811.11456). We use `tensorflow-gpu-1.4.0` which needs `cudnn6`. To run on CUDA ca 2019, you need to [download cudnn6 from here](http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/libcudnn6_6.0.21-1+cuda8.0_amd64.deb) and install along with CUDA8. Prepare a virtual environment and install requirements as follows. ```shell $ virtualenv -p `which python2` /path/to/girnet-env $ source /path/to/girnet-env/bin/activate (girnet-env)$ pip install -r requirements.txt ``` We will assume this code has been cloned to `/path/to/mtl_girnet` as the code base directory. Download the [zipped data files](https://drive.google.com/open?id=1fksInwJMD9vlFfduonjDyNMJ5GbUkKTQ) and unzip in the code base directory, which will place all the .h5 files in the data subdirectory. [Gdrive](https://github.com/prasmussen/gdrive) can be used for downloading.
1,925
divisionai/deep-photo-styletransfer
['style transfer', 'semantic segmentation']
['DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs', 'Deep Photo Style Transfer']
gen_all.py
# deep-photo-styletransfer Code and data for paper "[Deep Photo Style Transfer](https://arxiv.org/abs/1703.07511)" ## Disclaimer **This software is published for academic and non-commercial use only.** ## Setup This code is based on torch. It has been tested on Ubuntu 14.04 LTS. Dependencies: * [Torch](https://github.com/torch/torch7) (with [matio-ffi](https://github.com/soumith/matio-ffi.torch) and [loadcaffe](https://github.com/szagoruyko/loadcaffe)) * [Matlab](https://www.mathworks.com/) or [Octave](https://www.gnu.org/software/octave/) CUDA backend:
1,926
dl-maxwang/blazeface-tensorflow
['face detection']
['BlazeFace: Sub-millisecond Neural Face Detection on Mobile GPUs']
train.py BlazeFace.py main build_prediction_convs
# blazeface-tensorflow tensorflow implementation of BlazeFace Dependencies: Tensorflow 1.14 TODO list: <ol> <li>build model architecture. √</li> <li>make it adapt to multiple scale (currently only 128*128 image)</li> <li>build loss and training pipeline</li> <li>build dataset pipeline.</li>
1,927
dl4sits/BreizhCrops
['time series']
['BreizhCrops: A Time Series Dataset for Crop Type Mapping']
examples/evaluate.py processing/create_h5py.py breizhcrops/models/MSResNet.py breizhcrops/models/__init__.py breizhcrops/models/pretrained.py breizhcrops/models/TempCNN.py breizhcrops/__init__.py processing/write_classmapping.py processing/query_gee.py tests/data.py breizhcrops/models/StarRNN.py examples/train.py processing/write_tileids.py breizhcrops/models/OmniScaleCNN.py tests/training.py tests/package.py breizhcrops/datasets/urls.py examples/tune.py breizhcrops/models/LongShortTermMemory.py breizhcrops/datasets/breizhcrops.py tests/models.py breizhcrops/models/InceptionTime.py setup.py breizhcrops/models/TransformerModel.py processing/write_annotated_shp.py breizhcrops/utils.py untar unzip download_file update_progress DownloadProgressBar get_default_transform get_default_target_transform BreizhCrops ShortcutLayer InceptionModule InceptionTime LSTM BasicBlock3x3 conv3x3 conv5x5 MSResNet BasicBlock7x7 BasicBlock5x5 conv7x7 SampaddingConv1D_BN generate_layer_parameter_list get_out_channel_number build_layer_with_layer_parameter get_Prime_number_in_a_range OmniScaleCNN pretrained _download_and_load_weights StarRNN StarLayer StarCell TempCNN Conv1D_BatchNorm_Relu_Dropout Flatten FC_BatchNorm_Relu_Dropout Flatten TransformerModel select_hyperparameter main save parse_args get_dataloader metrics train train_epoch test_epoch parse_args get_model parse_args tune parse shapely2ee query load_geojson main parse_args main main check_exists test_download_h5dataset test_breizhcrops_geodataframe test_evaluate_models_fast evaluate_models test_evaluate_models test_get_codes_breizhcrops test_models_dummy_data test_init_breizhcrops test_breizhcrops_index_columnames test_pretrained test_data_value_range test_urls test_get_model test_belle_ile test_training int format isinstance write float round flush dirname print array append range int sum append get_out_channel_number get_Prime_number_in_a_range len join basename gettempdir download_file load_state_dict to eval lower _download_and_load_weights state_dict print dict dirname makedirs workers model batchsize fold save device datapath str Adam test_epoch logdir CrossEntropyLoss range get_dataloader classification_report join print select_hyperparameter train_epoch parameters cpu modelname get_model numpy makedirs add_argument ArgumentParser workers model batchsize device datapath list Adam test_epoch level preload_ram append logdir CrossEntropyLoss range get_dataloader join metrics set_index print train_epoch to_csv parameters mode cpu modelname get_model epochs makedirs ConcatDataset print dict DataLoader abspath BreizhCrops to lower recall_score precision_score cohen_kappa_score f1_score accuracy_score list train eval dict split dict int train choice format to_crs len list zip filterBounds DataFrame items T list dict to_file read_csv merge check_exists ID join list str append exists BreizhCrops skip len geodataframe pretrained DataLoader test_epoch numpy BreizhCrops CrossEntropyLoss evaluate_models evaluate_models get_model rand model BreizhCrops BreizhCrops zeros list columns sort zip BreizhCrops check geodataframe BreizhCrops get_codes get_model to exp torchmodel parse_args train
dl4sits/BreizhCrops
1,928
dlej/MASK
['time series']
['Wearing a MASK: Compressed Representations of Variable-Length Sequences Using Recurrent Neural Tangent Kernels']
utils.py VErf3 thVReLU thJ1 Gmatrix getCor VDerErf3 clone_grads flatten VStep paramdot VReLU getCov J1 named_parameters detach items list reshape dict append T diag sqrt list range sqrt list range clamp list thJ1 range
# MASK MASK: a framework for dimensionality reduction of variable-length sequences using RNTK This repository generates the resuls from the paper _Wearing a MASK: Compressed Representations of Variable-Length Sequences Using Recurrent Neural Tangent Kernels_. RNTK implementation in `ODE-Caeuler.ipynb` and `util.py` are taken from [https://github.com/thegregyang/NTK4A](https://github.com/thegregyang/NTK4A).
1,929
dmadras/local-ensembles
['active learning', 'out of distribution detection']
['Detecting Underspecification with Local Ensembles']
local_ensembles/lanczos_functions.py utils/utils.py local_ensembles_demo.py utils/tensor_utils.py utils/tabular_dataset_utils.py local_ensembles_demo_lib.py local_ensembles/run_baselines.py local_ensembles/train_regressor_ood.py utils/dataset_iterator.py local_ensembles/second_order.py local_ensembles/run_local_ensembles_main.py local_ensembles/evaluation_functions.py utils/__init__.py utils/running_average_loss.py local_ensembles/train_classifier_ood.py local_ensembles/run_local_ensembles.py model/train_model.py local_ensembles/load_model.py model/classifier.py utils/dataset_utils.py model/regressor.py __init__.py inbin implicit_hvp train_NN estimate_Hessian plot_data_1d_ensemble MLPRegressor plot_data_1d setup_data_1d get_min_dist get_all_min_dists get_auc lanczos_iteration sort_eigendata_by_absolute_value get_eigendecomposition_from_tridiagonal load_model load_cnn_classifier load_mlp_regressor run_baselines get_preds_and_reprs_in_minibatches get_model_dim record_results plot_aucs get_loss_grads_in_minibatches record_aucs get_pred_grads_in_minibatches get_saved_lanczos_tensors main load_saved_data calculate_aucs main make_map_grad_fn make_pred_fn get_pred_grads make_loss_fn hvp make_grad_fn get_loss_grads main main CNN Classifier MLP Regressor MLP train_classifier test_classifier DatasetIterator filter_label_function process_colour_image_and_make_label_onehot get_supervised_batch_noise_iterator get_iterator_by_class make_onehot get_image_processing_function get_hash_filter_function binarize_image_and_make_label_onehot load_dataset_ood load_dataset_ood_supervised_onehot get_supervised_batch_noise get_hash RunningAverageLoss load_wine load_abalone load_regression_dataset load_boston load_diabetes make_ood_split normalize_weight_shaped_vector get_data_in_minibatches flat_concat reshape_vector_as cosine_similarity write_losses_to_log save_images load_model plot_samples load_json update_losses plot_losses aggregate_batches write_metrics save_tensors load_tensor checkpoint_model write_json print_losses make_subdir T weights flat_concat reshape_vector_as hvp show normal DatasetIterator join concatenate tight_layout scatter savefig legend sin xticks yticks show join y arange plot model tight_layout scatter clf savefig legend expand_dims xticks x yticks show join y arange plot model tight_layout scatter clf savefig legend expand_dims xticks x yticks list format get_loss __next__ print weights gradient AdamOptimizer reduce_mean MLPRegressor apply_gradients zip range make_map_grad_fn make_grad_fn numpy make_loss_fn roc_auc_score concatenate amin norm append get_min_dist array range T norm format concatenate print A_fn astype matmul append sum range squeeze eigh_tridiagonal sorted stack zip load_json join format CNN load_model load_model MLP append concat enumerate model format print get_all_min_dists flat_concat get_preds_and_reprs_in_minibatches softmax get_auc numpy x concatenate print get_pred_grads flat_concat append numpy concatenate print flat_concat append numpy get_loss_grads load join format DatasetIterator format print get_auc save_tensors append amin join clf savefig plot join format print write close open items list record_aucs load join format get_model_dim y arange record_results model set_random_seed get_loss_grads_in_minibatches linspace get_pred_grads_in_minibatches save_tensors load_saved_data exists max get_eigendecomposition_from_tridiagonal seed calculate_aucs list load_model len matmul make_loss_fn lanczos_iteration next record_aucs range make_map_grad_fn format make_pred_fn sort_eigendata_by_absolute_value concatenate plot_aucs tile load join time items T norm print min run_baselines eye split get_saved_lanczos_tensors make_grad_fn x makedirs flag_values_dict CNN train_classifier aggregate_batches test_classifier make_subdir load_dataset_ood_supervised_onehot checkpoint_model load_regression_dataset MLP RALoss gradient update_losses get_value write_losses_to_log list restore apply_gradients next range format get_loss plot_losses write_json info zip checkpoint_model maxsize join weights AdamOptimizer print_losses list get_loss save_tensors RALoss concat update_losses range write_metrics zip append next print_losses int64 astype binarize_image_and_make_label_onehot process_colour_image_and_make_label_onehot reduce_join as_string prefetch get_image_processing_function load join load join int concatenate rand astype logical_not choice flatten startswith binomial randint range seed load_wine load_abalone int normal list format DatasetIterator print load_boston mean choice load_diabetes make_ood_split startswith float std range append reshape size concat reduce_euclidean_norm maximum flat_concat append next numpy update join format info join format name join format get_history join format yscale join format plot name get_history clf join Checkpoint save restore model_class Checkpoint join makedirs join zip vae clf generate next heatmap range append next zip dumps
# Detecting Extrapolation with Local Ensembles David Madras, James Atwood, Alex D'Amour See `local_ensembles_demo.ipynb` for a demonstration of the method on a toy model. You can run similar code with `python local_ensembles_demo.py` to reproduce the experiments in the paper from "Visualizing Extrapolation Detection". (Fig 5.1a, b). To run the local ensembles method on a pre-trained model, do the following: 1. Set up a virtual environment with the dependencies in `requirements.txt` (see below). 2. Choose a directory _DIR_ and save a checkpoint of the pre-trained model in _DIR_/ckpts. You may have to change the model loading code in `local_ensembles/load_model.py` to suit your model structure. 3. Save samples from the training, validation, in-distribution test, and OOD data sets _DIR_/tensors. Call the files `{train, valid, test, ood}_{x, y}.npy`. 4. Choose a number of Lanczos iterations _NUM_ITERS_ to run, and an interval _PROJECTION_STEP_ denoting which values of _m_ to calculate the extrapolation score for (if _PROJECTION_STEP_ = 10, the score will be calculated for _m_ = 1, 11, 21 ... _NUM_ITERS_) 4. Run `local_ensembles/run_local_ensembles_main.py` as follows (for a regression model): ```
1,930
dmarcosg/DSAC
['instance segmentation', 'semantic segmentation']
['Learning deep structured active contours end-to-end']
active_contours_fast.py snake_utils.py main_vaihingen.py main_bing.py active_countour_gradients active_contour_step draw_poly draw_poly_fill derivatives_poly epoch snake_process epoch snake_process CNN max_pool_2x2 plot_snakes polygon_area batch_norm CNN_B_alpha active_contour_step conv2d snake_graph plot_for_figure CNN_B_scalar imrotate bias_variable CNN_B gaussian_filter weight_variable abs round list matmul shape append range concatenate square stack minimum tanh T reshape float32 maximum int32 zeros diag fromarray ellipse Draw ones shape eval zeros round range len matmul roll sqrt eye power len fromarray Draw tolist polygon zeros splprep splev print interp1d matmul roll sqrt intp_der2 linspace eye power intp_der1 range zeros len T time gradient shape append zeros range run arange rand cos pi linspace imrotate derivatives_poly run matmul sin snake_process sum range plot_snakes copy minimum T time reshape float32 maximum draw_poly_fill len concat gather multiply squeeze reduce_sum cast _value matrix_inverse TensorShape eye fromarray radians abs print size cos expand rotate sqrt sin ceil float atan max show remove subplots set_title plot imresize suptitle axis colorbar shape imshow abs range len show subplots plot imresize axis shape imshow abs range truncated_normal Variable multiply add_to_collection l2_loss zeros exp array pi constant Variable ones shape zeros moments trainable_variables gradients concat add_n bias_variable resize_images max_pool_2x2 get_collection placeholder conv2d append range batch_norm relu gaussian_filter reshape float32 reduce_mean weight_variable trainable_variables gradients concat add_n bias_variable resize_images max_pool_2x2 ones get_collection placeholder conv2d append range batch_norm relu gaussian_filter reshape float32 reduce_mean weight_variable trainable_variables gradients concat add_n bias_variable resize_images max_pool_2x2 ones get_collection placeholder conv2d append range batch_norm relu gaussian_filter reshape float32 weight_variable trainable_variables gradients concat add_n bias_variable resize_images max_pool_2x2 ones get_collection placeholder conv2d append range batch_norm relu gaussian_filter reshape float32 reduce_mean weight_variable constant float32 placeholder active_contour_step range
# Deep Structured Active Contours (DSAC) This code allows to train a CNN model to predict a good map of penalizations for the different term of an Active Contour Model (ACM) such that the result gets close to a set of ground truth contours, as presented in [[1]](#marcos2018) (to appear in CVPR 2018). A preprint of the paper can be found in https://arxiv.org/pdf/1803.06329.pdf ## Datasets [Vaihingen buildings](https://drive.google.com/open?id=1nenpWH4BdplSiHdfXs0oYfiA5qL42plB) [Bing Huts](https://drive.google.com/open?id=1Ta21c3jucWFoe5jwiVXXiAgozvdmnQKP) ## Usage Download and unzip the datasets. Modify the dataset paths in the main files and run them with Python 3. Requires Tensorflow 1.4. Please contact me at [email protected] for questions and feedback. <a name="marcos2018"></a>
1,931
dnguyen1196/word-embedding-cp
['outlier detection', 'word embeddings']
['Word Embeddings via Tensor Factorization']
gensim/summarization/commons.py gensim/models/word2vec.py wikisem500/src/tests/test_test_group.py gensim/models/lsimodel.py gensim/test/test_lee.py gensim/summarization/__init__.py gensim/corpora/wikicorpus.py embedding_benchmarks/scripts/web/_utils/compat.py gensim/models/wrappers/dtmmodel.py gensim/utils.py gensim/test/test_doc2vec.py gensim/corpora/ucicorpus.py gensim/corpora/mmcorpus.py gensim/summarization/pagerank_weighted.py embedding_benchmarks/scripts/web/tests/test_similarity.py test_gensim.py gensim/scripts/make_wiki_lemma.py gensim/corpora/lowcorpus.py gensim/models/ldaseqmodel.py gensim/summarization/textcleaner.py wikisem500/evaluate.py gensim/examples/dmlcz/gensim_xml.py gensim/corpora/__init__.py gensim/test/test_similarity_metrics.py web/embedding.py web/tests/test_similarity.py gensim/scripts/make_wiki_online.py web/tests/test_fetchers.py gensim/models/wrappers/__init__.py web/_utils/compat.py wikisem500/src/evaluator.py gensim/test/test_miislita.py gensim/test/basetests.py gensim/topic_coherence/direct_confirmation_measure.py web/vocabulary.py gensim/models/ldamulticore.py embedding_benchmarks/scripts/web/tests/test_categorization.py embedding_benchmarks/scripts/word2vec_wikipedia/process_wiki.py gensim/test/simspeed2.py gensim/test/test_rpmodel.py gensim/test/__init__.py web/tests/test_embedding.py gensim/test/test_logentropy_model.py gensim/models/__init__.py wikisem500/src/tests/utils_tests.py gensim/similarities/index.py gensim/test/test_keywords.py gensim/test/test_summarization.py web/embeddings.py gensim/corpora/sharded_corpus.py gensim/test/test_normmodel.py tensor_embedding.py word_counts_to_pmi.py gensim/test/test_aggregation.py gensim/scripts/make_wiki_online_lemma.py gensim/models/tfidfmodel.py embedding_benchmarks/scripts/web/analogy.py embedding_benchmarks/scripts/web/embedding.py gensim/parsing/preprocessing.py gensim/models/basemodel.py embedding_evaluation.py embedding_benchmarks/scripts/web/embeddings.py web/datasets/utils.py gensim/test/test_coherencemodel.py gensim/test/test_segmentation.py gensim/test/test_similarities.py gensim/models/alt_embedding.py embedding_benchmarks/scripts/web/vocabulary.py gensim/test/test_utils.py embedding_benchmarks/scripts/web/version.py gensim/models/lsi_worker.py embedding_benchmarks/scripts/web/tests/test_fetchers.py embedding_benchmarks/scripts/web/tests/test_analogy.py embedding_benchmarks/scripts/web/evaluate.py web/evaluate.py gensim/interfaces.py wikisem500/run_tests.py embedding_benchmarks/scripts/web/tests/test_vocabulary.py gensim/topic_coherence/aggregation.py wikisem500/src/lib/polyglot/base.py gensim/models/logentropy_model.py gensim/scripts/word2vec_standalone.py gensim/scripts/make_wikicorpus.py gensim/summarization/graph.py gensim/test/test_glove2word2vec.py wikisem500/src/lib/polyglot/mapping/expansion.py wikisem500/src/lib/polyglot/mapping/tests/test_embeddings.py gensim/topic_coherence/segmentation.py gensim/examples/dmlcz/gensim_genmodel.py gensim/test/test_big.py gensim/models/doc2vec.py gensim/test/simspeed.py wikisem500/src/lib/polyglot/mapping/__init__.py wikisem500/src/lib/polyglot/utils.py wikisem500/src/tests/test_embedding.py gensim/corpora/malletcorpus.py gensim/test/test_indirect_confirmation.py gensim/test/test_corpora.py wikisem500/src/outlier_test_group.py embedding_benchmarks/scripts/web/datasets/__init__.py gensim/test/test_corpora_hashdictionary.py embedding_benchmarks/scripts/word2vec_wikipedia/train.py embedding_benchmarks/scripts/web/datasets/categorization.py wikisem500/src/lib/polyglot/mapping/embeddings.py web/datasets/__init__.py gensim/similarities/__init__.py gensim/test/test_ldamodel.py gensim/models/hdpmodel.py gensim/models/wrappers/ldavowpalwabbit.py gensim/test/test_parsing.py web/datasets/categorization.py gensim/__init__.py gensim/nosy.py embedding_benchmarks/scripts/web/datasets/analogy.py gensim/test/test_direct_confirmation.py web/datasets/similarity.py gensim/examples/dmlcz/sources.py embedding_benchmarks/scripts/web/datasets/similarity.py gensim/summarization/syntactic_unit.py gensim/models/lsi_dispatcher.py embedding_comparison.py gensim/test/test_hdpmodel.py gensim_utils.py gensim/test/test_corpora_dictionary.py web/analogy.py gensim/examples/dmlcz/gensim_build.py gensim/examples/dmlcz/dmlcorpus.py gensim/similarities/docsim.py gensim/summarization/keywords.py gensim/test/test_phrases.py gensim/corpora/dictionary.py embedding_benchmarks/scripts/web/tests/test_embedding.py gensim/models/ldamodel.py wikisem500/src/tests/test_evaluator.py gensim/test/test_word2vec.py gensim/scripts/glove2word2vec.py gensim/summarization/summarizer.py gensim/models/lda_worker.py gensim/matutils.py gensim/test/test_dtm.py gensim/corpora/hashdictionary.py web/tests/test_analogy.py embedding_benchmarks/scripts/web/utils.py gensim/corpora/bleicorpus.py gensim/topic_coherence/probability_estimation.py gensim/corpora/indexedcorpus.py embedding_benchmarks/scripts/evaluate_on_all.py wikisem500/src/utils.py gensim/models/normmodel.py gensim/corpora/textcorpus.py gensim/test/test_lsimodel.py gensim/models/rpmodel.py web/tests/test_categorization.py gensim/topic_coherence/__init__.py gensim/scripts/make_wiki_online_nodebug.py wikisem500/src/embeddings.py gensim/parsing/__init__.py web/datasets/analogy.py gensim/scripts/make_wiki.py wikisem500/src/lib/polyglot/mapping/tests/test_expansion.py gensim/test/test_ldamallet_wrapper.py gensim/test/test_sharded_corpus.py gensim/parsing/porter.py gensim/models/coherencemodel.py gensim/models/wrappers/ldamallet.py gensim/test/test_probability_estimation.py gensim/corpora/svmlightcorpus.py gensim/summarization/bm25.py gensim/test/test_ldavowpalwabbit_wrapper.py gensim/test/test_ldaseqmodel.py gensim/test/test_wikicorpus.py gensim/topic_coherence/indirect_confirmation_measure.py gensim/models/lda_dispatcher.py web/utils.py word_count.py embedding_benchmarks/scripts/web/datasets/utils.py gensim/test/svd_error.py web/tests/test_vocabulary.py gensim/test/test_tfidfmodel.py wikisem500/src/lib/polyglot/__init__.py embedding_benchmarks/scripts/evaluate_embeddings.py wikisem500/src/lib/polyglot/mapping/base.py gensim/corpora/csvcorpus.py gensim/models/phrases.py tensor_decomp.py web/version.py EmbeddingComparison EmbeddingTaskEvaluator evaluate_vectors_from_path evaluate write_embedding_to_file get_target_y sentences_generator get_context_matrix batch_generator2 batch_generator test_symmetric_decomp SymmetricCPDecomp CPDecomp test_decomp JointSymmetricCPDecomp test_joint_decomp TensorEmbedding PpmiSvdEmbedding PMIGatherer update_counts main input_with_timeout GensimSandbox list_vars_in_checkpoint run_job SimpleAnalogySolver Embedding fetch_GloVe fetch_HDC fetch_PDC fetch_morphoRNNLM fetch_SG_GoogleNews fetch_NMT fetch_HPCA load_embedding evaluate_categorization evaluate_on_WordRep evaluate_on_all evaluate_analogy calculate_purity evaluate_on_semeval_2012_2 evaluate_similarity batched standardize_string _open any2utf8 Vocabulary CountedVocabulary OrderedVocabulary count fetch_msr_analogy fetch_google_analogy fetch_wordrep fetch_semeval_2012_2 fetch_battig fetch_ESSLI_2c fetch_ESSLI_1a fetch_BLESS fetch_AP fetch_ESSLI_2b fetch_SimLex999 fetch_RW fetch_multilingual_SimLex999 fetch_WS353 fetch_MEN fetch_RG65 fetch_MTurk _chunk_read_ _get_cluster_assignments _filter_column _fetch_file readlinkabs _chunk_report_ _format_time _uncompress_file _tree _get_dataset_descr movetree _get_as_pd _md5_sum_file _read_md5_sum_file _filter_columns _change_list_to_np _get_dataset_dir test_analogy_solver test_wordrep_solver test_semeval_solver test_categorization test_purity test_save_2 test_save test_standardize test_standardize_preserve_identity test_RW_fetcher test_MEN_fetcher test_simlex999_fetchers test_analogy_fetchers test_MTurk_fetcher test_ws353_fetcher test_categorization_fetchers test_RG65_fetcher test_similarity md5_hash TransformedCorpus SimilarityABC TransformationABC CorpusABC ismatrix corpus2dense MmWriter ret_normalized_vec full2sparse_clipped full2sparse isbow Dense2Corpus cossim jaccard pad MmReader Sparse2Corpus scipy2sparse zeros_aligned any2sparse qr_destroy corpus2csc sparse2full veclen Scipy2Corpus kullback_leibler unitvec ret_log_normalize_vec argsort hellinger checkSum pyro_daemon revdict qsize any2unicode check_output lemmatize chunkize file_or_filename get_my_ip sample_dict upload_chunked randfname RepeatCorpusNTimes safe_unichr any2utf8 InputQueue simple_preprocess toptexts deaccent identity dict_from_corpus mock_data_row get_max_id chunkize_serial smart_extension unpickle keep_vocab_item getNS copytree_hardlink RepeatCorpus has_pattern tokenize mock_data synchronous NoCM is_corpus FakeDict ClippedCorpus SaveLoad prune_vocab decode_htmlentities pickle SlicedCorpus NullHandler BleiCorpus CsvCorpus Dictionary HashDictionary IndexedCorpus split_on_space LowCorpus MalletCorpus MmCorpus ShardedCorpus SvmLightCorpus TextCorpus UciReader UciCorpus UciWriter get_namespace process_article remove_markup WikiCorpus extract_pages remove_file filter_wiki tokenize remove_template DmlConfig DmlCorpus buildDmlCorpus generateSimilar ArticleSource DmlCzSource DmlSource ArxmlivSource WordEmbedding BaseTopicModel CoherenceModel TaggedLineDocument Doctag DocvecsArray TaggedBrownCorpus Doc2Vec TaggedDocument LabeledSentence expect_log_sticks lda_e_step HdpModel dirichlet_expectation HdpTopicFormatter SuffStats LdaState dirichlet_expectation update_dir_prior LdaModel get_random_state LdaMulticore worker_e_step LdaSeqModel sslm df_obs f_obs LdaPost Dispatcher main main Worker LogEntropyModel print_debug asfarray Projection ascarray clip_spectrum LsiModel stochastic_svd Dispatcher main main Worker NormModel Phrases pseudocorpus Phraser RpModel df2idf precompute_idfs TfidfModel train_sg_pair score_sg_pair BrownCorpus Text8Corpus LineSentence Vocab score_cbow_pair Word2Vec train_cbow_pair VocabTransform DtmModel malletmodel2ldamodel LdaMallet vwmodel2ldamodel _parse_vw_output LdaVowpalWabbit write_corpus_as_vw _run_vw_command corpus_to_vw _bit_length PorterStemmer strip_tags strip_numeric remove_stopwords preprocess_string strip_punctuation strip_short read_file split_alphanum preprocess_documents strip_multiple_whitespaces read_files strip_non_alphanum stem_text get_glove_info glove2word2vec SparseMatrixSimilarity Shard query_shard WmdSimilarity Similarity MatrixSimilarity AnnoyIndexer BM25 get_bm25_weights build_graph remove_unreachable_nodes Graph IGraph _get_average_score _get_words_for_graph _init_queue _get_first_window _update_queue get_graph _extract_tokens _process_text _get_pos_filters _get_combined_keywords _process_word _set_graph_edges _queue_iterator _format_results keywords _set_graph_edge _lemmas_to_words _process_first_window _get_keywords_with_score _strip_word pagerank_weighted build_adjacency_matrix build_probability_matrix process_results _set_graph_edge_weights _get_similarity _extract_important_sentences summarize _get_important_sentences _format_results summarize_corpus _create_valid_graph _build_hasheable_corpus _get_sentences_with_word_count _get_doc_length _build_corpus SyntacticUnit undo_replacement clean_text_by_word split_sentences merge_syntactic_units join_words get_sentences replace_with_separator replace_abbreviations tokenize_by_word clean_text_by_sentences testfile TestHdpModel TestBaseTopicModel norm2 rmse ClippedCorpus print_error TestAggregation testfile TestLargeData BigCorpus testfile checkCoherenceMeasure TestCoherenceModel CorpusTestCase testfile TestSvmLightCorpus TestTextCorpus TestMmCorpus TestLowCorpus TestUciCorpus DummyTransformer TestBleiCorpus datapath TestMalletCorpus TestDictionary get_tmpfile TestHashDictionary get_tmpfile TestDirectConfirmationMeasure testfile DocsLeeCorpus TestDoc2VecModel ConcatenatedDoc2Vec ConcatenatedDocvecs read_su_sentiment_rotten_tomatoes assertLess TestDtmModel TestIndirectConfirmation TestKeywordsTest testfile TestLdaMallet testfile TestLdaMulticore TestLdaModel testRandomState TestLdaSeq get_corpus TestLdaVowpalWabbit TestLeeTest testfile TestLogEntropyModel testfile TestLsiModel datapath TestMiislita CorpusMiislita get_tmpfile testfile TestNormModel TestPreprocessing TestPhrasesModel TestPhraserModel TestPhrasesCommon TestProbabilityEstimation testfile TestRpModel TestSegmentation TestShardedCorpus TestSimilarity testfile TestDoc2VecAnnoyIndexer TestMatrixSimilarity TestSparseMatrixSimilarity TestWord2VecAnnoyIndexer TestWmdSimilarity _TestSimilarityABC TestIsBow TestHellinger TestKL TestJaccard TestSummarizationTest testfile TestTfidfModel TestUtils TestIsCorpus TestSampleDict TestWikiCorpus testfile _rule LeeCorpus TestWord2VecSentenceIterators TestWord2VecModel assertLess TestWMD arithmetic_mean log_ratio_measure log_conditional_probability _present cosine_similarity _make_seg p_boolean_document p_boolean_sliding_window _ret_top_ids s_one_pre s_one_one s_one_set SimpleAnalogySolver Embedding fetch_GloVe fetch_HDC fetch_PDC fetch_morphoRNNLM fetch_SG_GoogleNews fetch_NMT fetch_HPCA load_embedding evaluate_categorization evaluate_on_WordRep evaluate_on_all evaluate_analogy calculate_purity evaluate_on_semeval_2012_2 evaluate_similarity batched standardize_string _open any2utf8 Vocabulary CountedVocabulary OrderedVocabulary count fetch_msr_analogy fetch_google_analogy fetch_wordrep fetch_semeval_2012_2 fetch_battig fetch_ESSLI_2c fetch_ESSLI_1a fetch_BLESS fetch_AP fetch_ESSLI_2b fetch_SimLex999 fetch_RW fetch_multilingual_SimLex999 fetch_WS353 fetch_MEN fetch_RG65 fetch_MTurk _chunk_read_ _get_cluster_assignments _filter_column _fetch_file readlinkabs _chunk_report_ _format_time _uncompress_file _tree _get_dataset_descr movetree _get_as_pd _md5_sum_file _read_md5_sum_file _filter_columns _change_list_to_np _get_dataset_dir test_analogy_solver test_wordrep_solver test_semeval_solver test_categorization test_purity test_save_2 test_save test_standardize test_standardize_preserve_identity test_RW_fetcher test_MEN_fetcher test_simlex999_fetchers test_analogy_fetchers test_MTurk_fetcher test_ws353_fetcher test_categorization_fetchers test_RG65_fetcher test_similarity md5_hash read_dataset_directory score_embedding WrappedEmbedding Embedding phrase_gen Evaluator ResolvedTestGroup TestGroup sigmoid decode similarity3 similarity TextFiles Sequence TextFile TokenSequence _decode _open _pickle_method pretty_list _print _unpickle_method VocabularyBase CountedVocabulary OrderedVocabulary count Embedding VocabExpander DigitExpander CaseExpander EmbeddingTest MixedExpansionTest CaseExpanderTest DigitExpanderTest EmbeddingTest EvaluatorTest TestGroupTest nop EmbeddingTestCase get_test_vectors vocab join most_similar format print evaluate_vectors_from_path clear_sims write_embedding_to_file format system vocab window index append range len get_target_y iter get_context_matrix append range enumerate append_chunks window int print rand ConfigProto Session einsum Session print rand append zeros ConfigProto array range Session print rand append ConfigProto array range len defaultdict get_indices abspath select write flush int bool argv format print train startswith float GensimSandbox join evaluate_on_all to_csv output_dir info load from_dict from_glove from_word2vec standardize_words normalize_words open _fetch_file _fetch_file _fetch_file _fetch_file _fetch_file _fetch_file _fetch_file T zeros_like astype set dot zeros enumerate vectors from_dict list format isinstance debug choice mean vstack calculate_purity max range fit_predict len vectors from_dict list defaultdict T isinstance fetch_semeval_2012_2 mean dot OrderedDict vstack correlation append sum keys len from_dict isinstance SimpleAnalogySolver set OrderedDict mean sum predict from_dict fetch_wordrep format product isinstance SimpleAnalogySolver category set info zeros float sum predict from_dict list format isinstance zip vstack array info append word_id from_dict iteritems y format evaluate_categorization isinstance join info DataFrame X evaluate_similarity isinstance text_type islice iter splitext isinstance join list int check_random_state glob len choice range _fetch_file append set startswith split append set split join defaultdict glob set split append union _fetch_file _get_cluster_assignments values apply _get_as_pd flatten float astype _get_as_pd values values astype mean _get_as_pd float std values _get_as_pd join glob _get_dataset_dir enumerate _fetch_file isabs readlink write float max time update int read strip close write tqdm len join print readlinkabs extend getenv islink append makedirs copyfileobj remove print extractall close is_zipfile is_tarfile dirname splitext ZipFile open zeros logical_or isinstance _filter_column ones fcomb logical_and logical_or zeros print dirname abspath join move rmdir listdir makedirs move warn exists urlparse basename dirname _get_dataset_dir close mkdir splitext join remove print _fetch_helper dumps _uncompress_file path rmtree movetree hexdigest makedirs join sorted isdir append listdir from_word2vec evaluate_on_semeval_2012_2 _fetch_file from_word2vec evaluate_on_WordRep _fetch_file list from_word2vec fetch_google_analogy evaluate_analogy choice range _fetch_file array from_word2vec fetch_ESSLI_2c _fetch_file from_word2vec standardize_string words standardize_words _fetch_file from_dict standardize_words join Vocabulary Embedding to_word2vec from_word2vec mkdtemp array join from_word2vec to_word2vec mkdtemp _fetch_file fetch_battig fetch_ESSLI_2c fetch_ESSLI_1a fetch_BLESS fetch_AP fetch_ESSLI_2b fetch_MTurk fetch_RW fetch_RG65 fetch_MEN product set fetch_WS353 set fetch_SimLex999 fetch_multilingual_SimLex999 fetch_msr_analogy iteritems fetch_wordrep X_prot fetch_semeval_2012_2 fetch_google_analogy vectors list y fetch_SimLex999 from_word2vec _fetch_file words dict zip X evaluate_similarity md5 encode update size asarray asarray num_docs num_terms len extend num_nnz info append empty csc_matrix enumerate shape zeros itemsize prod issparse ndarray isinstance tocsr dict zeros list itervalues asarray argsort asarray take enumerate sparse2full column_stack sqrt sum T exp sum max log len data sum issparse asarray tocsr ndarray isinstance float sqrt next iter blas_nrm2 abs sqrt sum issparse tolist issparse toarray sparse2full max len sqrt issparse sum toarray iteritems issparse toarray ndarray isinstance tolist set sum str gorgqr debug geqrf get_lapack_funcs shape asfortranarray triu join getcwd stat filter walk seek isinstance decode join normalize link copy2 copytree to_unicode lower deaccent finditer isinstance max get_max_id FakeDict chain next iter locateNS socket connect AF_INET getsockname SOCK_DGRAM iter chunkize_serial endswith splitext append sorted enumerate buffer preprocess grouper info append len join encode parse warn match append tokenize uniform list info len trim_rule get communicate CalledProcessError Popen poll to_utf8 to_unicode decode_htmlentities replace remove_file sub remove_template append join iter enumerate finditer group replace match clear text tag next get_namespace filter_wiki lemmatize tokenize buildDictionary processConfig DmlCorpus saveAsText save resultFile filterExtremes join locals articleDir debug write close getMeta info append enumerate open cumsum psi zeros sum len sum T exp ones dirichlet_expectation log dot mean abs array range len psi sum all copy psi polygamma warning sum RandomState isinstance get debug state put reset do_estep len compute_post_mean chain_variance range len chain_variance word_counts sslm totals compute_obs_deriv word compute_obs_deriv_fixed mean_deriv_mtx compute_post_mean Dispatcher join basicConfig pyro_daemon add_argument ArgumentParser info parse_args Worker cumsum abs min info sum len debug asfortranarray shape debug ascontiguousarray shape sum sorted join debug iterkeys flatten sqrt dot info append abs enumerate len data indptr indices max str dtype svd shape sum range issparse debug astype copy qr_destroy sqrt corpus2csc grouper clip_spectrum info csc_matvecs enumerate int T dot zeros ravel basename locals exit len range split deepcopy expit T syn0_lockf code randint hs searchsorted dot shape neg_labels negative syn0 zeros append expit T code randint hs searchsorted dot shape neg_labels negative zeros append deepcopy code code __doc__ LdaModel wordtopics append format debug float splitlines startswith decode join debug info Popen LdaModel _get_topics to_unicode to_unicode to_unicode to_unicode to_unicode to_unicode to_unicode to_unicode sub to_unicode PorterStemmer to_unicode f get_glove_info info debug getpid num_best list BM25 append get_scores sum keys len Graph add_node del_node nodes iteritems frozenset set append _get_pos_filters token add_edge token _set_graph_edge _get_first_window _combinations _get_first_window _Queue put _set_graph_edge _queue_iterator get put _process_word _update_queue _init_queue range len get put range qsize _process_first_window _process_text sort append iteritems token _tokenize_by_word list pop join copy append _strip_word range len split sort _tokenize_by_word _remove_unreachable_nodes list iteritems _set_graph_edges _pagerank _lemmas_to_words nodes to_unicode _clean_text_by_word _extract_tokens _get_combined_keywords _get_keywords_with_score _get_words_for_graph _build_graph split _tokenize_by_word list _set_graph_edges _clean_text_by_word _get_words_for_graph _build_graph T todense build_adjacency_matrix eigs build_probability_matrix edge_weight nodes append float sum range len empty_matrix nodes fill float len abs nodes enumerate add_edge all nodes _create_valid_graph _bm25_weights range len add_edge len nodes del_edge range has_edge _get_doc_length Dictionary dict list _build_hasheable_corpus zip append split len _get_important_sentences _remove_unreachable_nodes str _set_graph_edge_weights _pagerank sort _build_hasheable_corpus warning _build_graph str _extract_important_sentences sort _clean_text_by_sentences summarize_corpus warning _build_corpus replace_abbreviations sub finditer append range SyntacticUnit len split_sentences list merge_syntactic_units join_words tag replace_with_separator tokenize replace_with_separator str shape info print flush CoherenceModel assertTrue namedtuple extend _fields info len load_from_text datapath split set intersection append float log len intersection append float log len ndarray isinstance update cossim list items _make_seg zip _present append ndarray isinstance add from_iterable set add set _ret_top_ids enumerate len add_topic_posting tuple islice _ret_top_ids iter token2id append enumerate append enumerate append vectors mean warning set_trace evaluate_analogy scandir num_total_groups evaluate print num_cases Evaluator accuracy opp range len mean open print encode PY3 __self__ isinstance lstrip __class__ __name__ __mro__ str decode format append enumerate
# Tensor Decomp Embedding Code for the paper [Word Embedding via Tensor Decomposition](https://arxiv.org/abs/1704.02686). This project is implemented in Python 3 only. ## Training First, to set up the data, create a tokenized data file where one sentence is on each line and the words are separated by spaces. Then edit the absolute (or relative) file path in test_gensim.py in the sentences_generator function of GensimSandbox. (These functions are named as such because this repository was originally a fork of Gensim, and we were going to modify the existing code, but the purpose of this repository has since changed) To train a new embedding, look up a valid embedding method in the Makefile, then type "make <embedding>". It will prompt you to type in an experiment name (if you have one), but if you are not running a specific experiment, just press enter. Assuming you have all dependencies properly installed, it will train, evaluate, and save the learned embedding type. After training, the program will save the embedding and its associated metadata to "runs/<embedding>/<num_sents>_<min_vocab_count>_<embedding_dim>/" for easy access and comparison. ## Evaluation
1,932
dnguyengithub/MultitaskAIS
['anomaly detection']
['GeoTrackNet-A Maritime Anomaly Detector using Probabilistic Neural Network Representation of AIS Tracks and A Contrario Detection', 'A Multi-task Deep Learning Architecture for Maritime Surveillance using AIS Data Streams']
runners.py bounds.py nested_utils.py get_coastline_streetmap.py data/calculate_AIS_mean.py data/csv2pkl.py models/vrnn.py distribution_utils.py contrario_utils.py multitaskAIS.py data/dataset_preprocessing.py vessel_type_classification.py contrario_kde.py data/datasets.py utils.py data/dataset_nocyclone.py generate_vessel_type_dataset.py flags_config.py elbo always_resample_criterion never_resample_criterion fivo ess_criterion contrario_detection nCr zero_segments NFA nonzero_segments sample_from_logits sample_from_max_logits sample_one_hot sample_from_probs sublist tas_for_tensors tile_tensors read_tas gather_tensors map_nested create_eval_graph restore_checkpoint_if_exists create_dataset_and_model run_train wait_for_checkpoint createShapefile gaussian_filter_with_nan show_logprob_map remove_gaussian_outlier trackOutlier interpolate plot_abnormal_tracks detectOutlier create_new_conv_layer extract_batch_size one_hot sparse_AIS_to_dense sublist create_AIS_dataset getConfig create_vrnn VRNNCell NormalApproximatePosterior ConditionalNormalDistribution ConditionalBernoulliDistribution tas_for_tensors to_float zero_state constant reduce_logsumexp sequence_mask while_loop tile_tensors transpose reduce_max read_tas float32 reshape reduce_mean int32 zeros log tas_for_tensors zero_state constant sequence_mask while_loop tile_tensors transpose reduce_max reshape float32 reduce_mean int32 zeros list mul min reduce range append range len append range len range count_nonzero int min zeros range len cumsum less_equal logical_and greater reduce_sum float32 cast tile random_uniform concat argmax one_hot split sample concat Bernoulli split squash_prob concat sample_one_hot split flatten list map tas_for_tensors to_float zero_state constant reduce_logsumexp sequence_mask while_loop tile_tensors transpose reduce_max num_samples float32 reshape reduce_mean int32 zeros ess_criterion log join create_vrnn batch_size testset_path onehot_sog_bins onehot_cog_bins data_dim dirname onehot_lon_bins trainingset_path latent_size onehot_lat_bins create_AIS_dataset ConditionalBernoulliDistribution join restore basename get_checkpoint_state model_checkpoint_path sleep restore_checkpoint_if_exists info replica_device_setter argmax zeros sum range all inv astype logical_and trackOutlier zeros float range list POINT point record field strftime gmtime Writer save keys float inv fwd mean std gaussian_filter copy gaussian_filter_with_nan join append_axes make_axes_locatable close tight_layout colorbar isnan shape imshow flipud set_visible nan figure savefig gca zeros range list cmap plot xlabel float xlim ylabel tight_layout cmap_anomaly ylim savefig figure get_cmap keys range len reshape max int len shape list empty range relu Variable truncated_normal max_pool conv2d append array create_dense_vect padded_batch shuffle map make_one_shot_iterator get_next from_generator repeat dirname prefetch len parse_args add_argument ArgumentParser MLP NormalApproximatePosterior LSTMCell ConditionalNormalDistribution ConditionalBernoulliDistribution
# MultitaskAIS #### We have moved!!!. Check out https://github.com/CIA-Oceanix/GeoTrackNet for the lastest verion. TensorFlow implementation of the model proposed in "A Multi-Task Deep Learning Architecture for Maritime Surveillance Using AIS Data Streams" (https://ieeexplore.ieee.org/abstract/document/8631498) and "GeoTrackNet—A Maritime Anomaly Detector using Probabilistic Neural Network Representation of AIS Tracks and A Contrario Detection" (https://arxiv.org/abs/1912.00682). (GeoTrackNet is the anomaly detection module of MultitaskAIS). All the codes related to the Embedding block are adapted from the source code of Filtering Variational Objectives: https://github.com/tensorflow/models/tree/master/research/fivo #### Directory Structure The elements of the code are organized as follows: ``` multitaskAIS.py # script to run the model (except the A contrario detection).
1,933
dodgejesse/sparsifying_regularizers_for_RRNNs
['sentiment analysis']
['RNN Architecture Learning with Sparse Regularization']
language_model/train_lm.py cuda/onegram_rrnn.py semiring.py cuda/twogram_rrnn_semiring.py classification/run_current_experiment.py cuda/onegram_rrnn_semiring.py cuda/threegram_rrnn_semiring.py classification/experiment_tools.py classification/experiment_params.py cuda/fourgram_rrnn_semiring.py classification/run_random_search_experiments.py classification/regularization_search_experiments.py cuda/utils.py classification/modules.py classification/dataloader.py classification/load_learned_structure.py cuda/bigram_rrnn.py classification/run_local_experiment.py cuda/twogram_rrnn.py rrnn.py cuda/bigram_rrnn_semiring.py cuda/fourgram_rrnn.py classification/train_classifier.py cuda/unigram_rrnn.py classification/save_learned_structure.py rrnn_gpu.py cuda/threegram_rrnn.py classification/test_experiment.py RRNNLayer Max RRNN_Bigram_Compute_CPU Min LayerNorm RRNN_Unigram_Compute_CPU RRNNCell RRNN RRNN_Ngram_Compute_CPU RRNN_2gram_Compute_GPU RRNN_3gram_Compute_GPU RRNN_Bigram_Compute_GPU RRNN_4gram_Compute_GPU RRNN_1gram_Compute_GPU RRNN_Unigram_Compute_GPU zero neg_infinity identity one LogSum Semiring read_MPQA read_SUBJ create_batches pad_bert create_one_batch cv_split2 pad create_one_batch_bert load_embedding load_embedding_npz read_corpus read_bert load_embedding_txt read_SST read_bert_file cv_split read_TREC read_CR clean_str read_MR get_categories ExperimentParams preload_wordvec_embed preload_bert_embed preload_embed general_arg_parser str2bool select_param_value entropy_example entropy_rhos extract_ngrams l1_group_norms main l1_example get_norms EmbeddingLayer CNN_Text deep_iter hparam_sample search_reg_str_l1 search_reg_str_entropy train_k_then_l_models get_k_sorted_hparams get_kwargs_for_fine_tuning train_m_then_n_models hparam_sample preload_data preload_embed get_k_sorted_hparams main train_m_then_n_models main training_arg_parser get_unregularized_args main training_arg_parser run_random_search run_baseline_experiment update_mult_weights update_new_model_weights remove_old find_num_ngrams get_model_filepath update_linear_output_layer create_new_model to_file predict_one_example update_projection_layer update_bias_weights update_embedding_layer predict_all_train extract_learned_structure check_new_model_predicts_same compare_err encoder_fwd main train_model prox_step eval_model parse_args get_states_weights main_init Model main_test get_regularization_groups init_logging regularization_stop main print_top_traces log_groups str2bool main_visualize repackage_hidden train_model eval_model train_and_finetune generate_filename Model update_environment_variables create_batches print_and_log main EmbeddingLayer str2bool read_corpus encode Program compile encode Program compile encode Program compile encode Program compile encode Program compile sub seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list len shuffle range read_corpus seed join list shuffle read_bert_file range len int list shuffle range len max LongTensor contiguous pad reverse cuda len max len pad_bert Tensor len sorted list len shuffle create_one_batch_bert append range create_one_batch load endswith join time format print load_embedding read_bert time format print add_argument ArgumentParser l1_example entropy_example glob l1_group_norms str format print append get_norms range len asarray dataset strip append float from_file format fromstring Counter argmax range format print ExperimentParams entropy_rhos filename main main sum ExperimentParams remove_old seed time format search_reg_str_l1 remove_old print search_reg_str_entropy ExperimentParams get_k_sorted_hparams append main round get_kwargs_for_fine_tuning range len time format print ExperimentParams get_k_sorted_hparams main round range append sort range hparam_sample get_categories time preload_data print preload_embed ExperimentParams train_k_then_l_models linspace append train_m_then_n_models len print time format load_embedding read_bert time format print join hparam_sample base_dir dataset add_argument ArgumentParser seed int reg_goal_params base_data_dir run_baseline_experiment bert_embed baseline str2bool run_random_search select_param_value time train_m_then_n_models time print train_k_then_l_models get_unregularized_args train_m_then_n_models append len deepcopy print get_model_filepath extract_learned_structure save check_new_model_predicts_same gpu state_dict remove language_modeling logging_dir dataset filename format LongTensor print Variable drop predict_one_example predict_all_train compare_err type encoder_fwd bias index_select encoder_fwd weight drop print round eval_model format format print eval round range len view eval emb_layer encoder drop update_new_model_weights find_num_ngrams create_new_model update_linear_output_layer get_states_weights update_projection_layer rnn_lst append update_embedding_layer sum range cat len emb_layer output_layer data weight set_trace copy_ data weight set_trace copy_ update_mult_weights int view LongTensor Variable k range update_bias_weights append sum gpu data int view add_ index_select cat data view add_ index_select weight cat list out_features gpu keys Model emb_layer cuda pattern language_modeling d_out range len data norm asarray append sum range visualize format zip main_test split main_visualize criterion model args eval zip train gpu CrossEntropyLoss ngram int view transpose k bidirectional emb_size sum cat int norm sm Softmax view k get_states_weights bias_final bidirectional emb_size sum d_out log str norm int sm Softmax view write k bias_final emb_size d_out flush str format print loaded_embedding dataset write set_printoptions open filename_prefix filename language_modeling logging_dir makedirs get_states_weights data int norm view add_ k get_states_weights emb_size d_out range model zero_grad extract_learned_structure log_groups len clip_grad set_trace get_regularization_groups sum CrossEntropyLoss eval_model zip clip_grad_norm train flush reg_strength_multiple_of_loss time prox_step criterion backward write parameters reg_strength step gpu args batch_size score Min create_batches cuda visualize sorted input_model load_state_dict append range format concatenate main_init word2id eval u_indices zip flush enumerate load Variable print Max extend print_top_traces gpu len enumerate print_traces load format batch_size write input_model main_init word2id create_batches load_state_dict zip append cuda gpu flush seed load embedding reduced_model_path read_bert loaded_embedding fine_tune read_SST path bert_embed Model load_state_dict load_embedding manual_seed EmbeddingLayer max gpu batch_size SGD ReduceLROnPlateau create_batches save cuda list max_epoch Adam init_logging range state_dict close shuffle get_model_filepath main_init word2id flush train_model remove_old write to_file parameters filter d_out gpu add_argument ArgumentParser shuffle T map_to_ids copy Variable data enumerate repackage_hidden data batch_size add_ SGD print_pnorm dev weight_decay create_batches print_and_log save round eval_ite str exp view exit max_epoch map_to_ids filename logging_dir range read_corpus state_dict format patience size get_model_filepath test unroll_size lr remove_old mul_ init_hidden repackage_hidden exp view print len exit numel unroll_size init_hidden range int float generate_filename print_pnorm print_and_log n_V Model load_state_dict sum read_corpus reduced_model_path manual_seed load fine_tune train main lr_decay_epoch new_d_out max_epoch write flush sparsity_type format dropout learned_structure clip_grad weight_decay lr input_dropout pattern depth filename_prefix output_dropout d_out
# Rational Recurrences PyTorch implementation for RNN Architecture Learning with Sparse Regularization, Dodge et al., EMNLP 2019. An example experiment can be run using classification/example_command.sh
1,934
donamin/self-imitation-learning
['imitation learning']
['Self-Imitation Learning of Locomotion Movements through Termination Curriculum']
baselines-rl/baselines/common/mpi_running_mean_std.py baselines-rl/baselines/common/runners.py ode-walker/SCA/ode-0.12/bindings/python/demos/tutorial1.py baselines-rl/setup.py baselines-rl/baselines/common/tests/test_segment_tree.py baselines-rl/baselines/common/filters.py baselines-rl/baselines/common/running_mean_std.py baselines-rl/baselines/common/vec_env/vec_frame_stack.py baselines-rl/baselines/common/schedules.py ode-walker/SCA/ode-0.12/bindings/python/demos/tutorial2.py baselines-rl/baselines/common/mpi_moments.py baselines-rl/baselines/common/math_util.py ode-walker/SCA/data_gatherer_kll1.py ode-walker/SCA/ode-0.12/bindings/python/demos/tutorial3.py baselines-rl/baselines/common/tile_images.py ode-walker/SCA/eigen_332/debug/gdb/printers.py ode-walker/SCA/ode-0.12/tools/ode_convex_export.py ode-walker/SCA/ode-0.12/bindings/python/setup.py baselines-rl/baselines/common/__init__.py baselines-rl/baselines/ppo1/pposgd_ode.py ode-walker/SCA/density_plotter.py baselines-rl/baselines/common/mpi_adam.py baselines-rl/baselines/ppo1/run_ode.py ode-walker/SCA/sequence_plotter.py baselines-rl/baselines/common/tests/test_tf_util.py ode-walker/SCA/eigen_332/scripts/relicense.py ode-walker/SCA/eigen_332/debug/gdb/__init__.py baselines-rl/baselines/common/vec_env/subproc_vec_env.py baselines-rl/baselines/logger.py baselines-rl/baselines/common/segment_tree.py baselines-rl/baselines/ppo1/mlp_policy.py baselines-rl/baselines/common/cmd_util.py baselines-rl/baselines/common/running_stat.py baselines-rl/baselines/common/console_util.py baselines-rl/baselines/common/distributions.py baselines-rl/baselines/common/misc_util.py baselines-rl/baselines/common/test_identity.py baselines-rl/baselines/common/tf_util.py baselines-rl/baselines/common/atari_wrappers.py baselines-rl/baselines/common/vec_env/__init__.py baselines-rl/baselines/common/cg.py baselines-rl/baselines/common/input.py baselines-rl/baselines/common/mpi_fork.py baselines-rl/baselines/common/tests/test_schedules.py baselines-rl/baselines/common/vec_env/dummy_vec_env.py baselines-rl/baselines/common/identity_env.py ode-walker/SCA/awake_script.py baselines-rl/baselines/common/vec_env/vec_normalize.py baselines-rl/baselines/ppo1/data_plotter.py baselines-rl/baselines/common/dataset.py dumpkvs HumanOutputFormat SeqWriter get_dir read_json warn set_level Logger CSVOutputFormat log logkvs make_output_format JSONOutputFormat read_tb getkvs configure TensorBoardOutputFormat debug logkv info KVWriter _demo error ProfileKV scoped_configure logkv_mean reset profile read_csv WarpFrame LazyFrames make_atari FireResetEnv EpisodicLifeEnv ScaledFloatFrame wrap_deepmind NoopResetEnv FrameStack MaxAndSkipEnv ClipRewardEnv cg atari_arg_parser make_robotics_env mujoco_arg_parser arg_parser make_atari_env robotics_arg_parser make_mujoco_env fmt_row colorize fmt_item timed Dataset iterbatches MultiCategoricalPd BernoulliPd fc Pd DiagGaussianPdType test_probtypes BernoulliPdType ortho_init CategoricalPdType shape_el DiagGaussianPd validate_probtype make_pdtype MultiCategoricalPdType PdType CategoricalPd Filter IdentityFilter StackFilter ZFilter FlattenFilter CompositionFilter AddClock DivFilter Ind2OneHotFilter IdentityEnv observation_input test_discount_with_boundaries explained_variance_2d explained_variance flatten_arrays ncc discount_with_boundaries unflatten_vector discount pickle_load RunningAvg boolean_flag set_global_seeds EzPickle pretty_eta relatively_safe_pickle_dump zipsame unpack get_wrapper_by_name MpiAdam test_MpiAdam mpi_fork _helper_runningmeanstd mpi_moments mpi_mean test_runningmeanstd test_dist RunningMeanStd test_runningmeanstd AbstractEnvRunner RunningMeanStd test_runningmeanstd test_running_stat RunningStat linear_interpolation Schedule ConstantSchedule PiecewiseSchedule LinearSchedule SegmentTree MinSegmentTree SumSegmentTree test_identity function GetFlat display_var_info huber_loss single_threaded_session save_state lrelu initialize get_placeholder numel conv2d intprod SetFromFlat make_session get_available_gpus switch flattenallbut0 normc_initializer in_session load_state get_placeholder_cached _Function var_shape flatgrad tile_images test_piecewise_schedule test_constant_schedule test_prefixsum_idx2 test_tree_set_overlap test_max_interval_tree test_prefixsum_idx test_tree_set test_multikwargs test_function DummyVecEnv worker SubprocVecEnv VecFrameStack VecNormalize VecEnvWrapper AlreadySteppingError VecEnv NotSteppingError CloudpickleWrapper find_indices MlpPolicy apply_activation ppo_learner add_vtarg_and_adv main EigenQuaternionPrinter lookup_function register_eigen_printers build_eigen_dictionary EigenMatrixPrinter update coord create_box pull _drawfunc _keyfunc length drop_object scalp draw_body _idlefunc prepare_GL near_callback explosion WriteMesh makedirs items list logkv log log log log join getcwd makedirs strftime Logger log split close log DEFAULT configure dumpkvs debug logkv_mean rmtree set_level logkv info exists join sorted defaultdict value isdir glob keys empty nan startswith append step max enumerate summary_iterator NoopResetEnv make MaxAndSkipEnv WarpFrame EpisodicLifeEnv FireResetEnv ScaledFloatFrame FrameStack ClipRewardEnv callback zeros_like print copy dot f_Ax range set_global_seeds seed make join str set_global_seeds get_dir Monitor Get_rank seed make set_global_seeds Monitor FlattenDictWrapper add_argument arg_parser add_argument arg_parser add_argument arg_parser join len str ndarray isinstance item abs append str print colorize time asarray arange array_split tuple shuffle map Box isinstance MultiDiscrete Discrete MultiBinary seed size DiagGaussianPdType BernoulliPdType CategoricalPdType MultiCategoricalPdType validate_probtype array function entropy randn print param_placeholder sample_placeholder logp calcloglik size mean sqrt repeat sample kl pdfromflat std run to_float one_hot isinstance placeholder shape n var var append reshape prod range zeros_like discount_with_boundaries array len list __next__ iter append range seed helper add_argument replace Wrapper isinstance env rename seed MpiAdam update function lossandgrad minimize Variable print astype square reduce_sum set_random_seed sin global_variables_initializer range run update copy check_call COMM_WORLD dtype asarray zeros_like size Allreduce ravel zeros sum asarray reshape square sqrt mpi_mean check_call COMM_WORLD seed concatenate print mpi_moments zipsame update initialize RunningMeanStd concatenate seed update initialize COMM_WORLD RunningMeanStd concatenate RunningStat randn mean append range push seed DummyVecEnv get_shape copy set_shape cast cond int ConfigProto cpu_count getenv update variables_initializer global_variables set run list _Function isinstance values as_list gradients placeholder name as_list prod info list_local_devices restore Saver get_default_session get_default_session Saver dirname save makedirs int list asarray reshape transpose shape sqrt ceil float array PiecewiseSchedule range ConstantSchedule SumSegmentTree SumSegmentTree SumSegmentTree SumSegmentTree MinSegmentTree recv close render reset send step x range len tanh leaky_relu crelu softplus relu softsign sigmoid elu softmax relu6 list reversed append empty range len decode add_subplot REP save ion max clip send_string socket timesteps_so_far set_xlabel array ticklabel_format legend append sum range Context ppo_learner configure format replace plot bind concatenate copy mean iters_so_far join time int act_batch print reshape pause min set_ylabel fill_between figure record_tabular split zeros train std dump_tabular append strip_typedefs search tag target type glShadeModel glClearColor glMatrixMode gluLookAt glViewport glLoadIdentity glLightfv glEnable gluPerspective glDisable glClear getPosition glPopMatrix getRotation glutSolidCube boxsize glMultMatrixd glScalef glPushMatrix setBody setMass Mass Body GeomBox setBox setPosition create_box setRotation cos uniform sin append length scalp addForce max getPosition list length scalp addForce getPosition collide ContactJoint setMu setBounce getBody attach exit prepare_GL draw_body glutSwapBuffers collide time pull drop_object range empty sleep step glutPostRedisplay explosion faces verts write index getData getName len
# Self-Imitation Learning of Locomotion Movements through Termination Curriculum This repository contains the source code for [our MIG 2019 paper](https://arxiv.org/abs/1907.11842): - Amin Babadi, Kourosh Naderi, and Perttu Hämäläinen. 2019. Self-Imitation Learning of Locomotion Movements through Termination Curriculum. In Motion, Interaction and Games (MIG ’19), October 28–30, 2019, Newcastle upon Tyne, United Kingdom. ACM, New York, NY, USA, 7 pages. # Abstract Animation and machine learning research have shown great advancements in the past decade, leading to robust and powerful methods for learning complex physically-based animations. However, learning can take hours or days, especially if no reference movement data is available. In this paper, we propose and evaluate a novel combination of techniques for accelerating the learning of stable locomotion movements through self-imitation learning of synthetic animations. First, we produce synthetic and cyclic reference movement using a recent online tree search approach that can discover stable walking gaits in a few minutes. This allows us to use reinforcement learning with Reference State Initialization (RSI) to find a neural network controller for imitating the synthesized reference motion. We further accelerate the learning using a novel curriculum learning approach called Termination Curriculum (TC), that adapts the episode termination threshold over time. The combination of the RSI and TC ensures that simulation budget is not wasted in regions of the state space not visited by the final policy. As a result, our agents can learn locomotion skills in just a few hours on a modest 4-core computer. We demonstrate this by producing locomotion movements for a variety of characters. # Examples ![Training process for the orc character learning to walk forward](img/training.gif) The gif above shows how the orc character is trained to walk using our approach (after automatic synthesis of a reference locomotion cycle). More examples can be seen in our [Youtube video](https://youtu.be/dxTZk35Ofyg). # Code Structure * ```ode-walker```: The C++ component that is used for producing reference motions using [FDI-MCTS](https://github.com/JooseRajamaeki/TVCG18).
1,935
donglixp/coarse2fine
['semantic parsing']
['Coarse-to-Fine Decoding for Neural Semantic Parsing']
logical/table/modules/LockedDropout.py django/table/Beam.py django/train.py wikisql/table/Beam.py logical/table/Utils.py logical/tree.py wikisql/lib/common.py wikisql/table/Loss.py logical/table/__init__.py django/table/modules/embed_regularize.py logical/bpe.py logical/table/modules/Gate.py django/table/modules/WeightDrop.py logical/table/modules/StackedRNN.py wikisql/evaluate.py wikisql/lib/table.py wikisql/train.py logical/table/Loss.py wikisql/lib/query.py django/table/modules/LockedDropout.py django/table/modules/Embeddings.py logical/preprocess.py logical/table/ModelConstructor.py wikisql/table/modules/Embeddings.py wikisql/table/modules/UtilClass.py logical/table/modules/embed_regularize.py wikisql/table/Translator.py django/table/Translator.py wikisql/tools/evaluate.py wikisql/table/ParseResult.py wikisql/table/Trainer.py wikisql/preprocess.py wikisql/table/modules/StackedRNN.py logical/table/Beam.py wikisql/opts.py wikisql/table/modules/GlobalAttention.py django/preprocess.py django/table/ParseResult.py django/table/modules/Gate.py logical/table/Models.py logical/table/modules/Embeddings.py django/table/ModelConstructor.py wikisql/table/Utils.py django/table/__init__.py django/table/modules/cross_entropy_smooth.py wikisql/annotate.py logical/table/ParseResult.py wikisql/table/modules/WeightNorm.py django/table/modules/UtilClass.py wikisql/table/Optim.py wikisql/table/modules/LockedDropout.py logical/table/IO.py django/table/Trainer.py django/table/modules/GlobalAttention.py wikisql/table/Models.py wikisql/table/modules/__init__.py logical/table/Translator.py django/tree.py django/table/modules/StackedRNN.py django/table/Models.py logical/train.py wikisql/table/modules/Gate.py logical/table/Trainer.py wikisql/table/IO.py logical/table/Optim.py logical/table/modules/GlobalAttention.py wikisql/table/modules/WeightDrop.py django/table/IO.py django/table/Optim.py wikisql/lib/dbengine.py logical/table/modules/cross_entropy_smooth.py logical/table/modules/WeightNorm.py django/table/modules/__init__.py django/table/Utils.py wikisql/table/__init__.py logical/opts.py logical/table/modules/WeightDrop.py wikisql/table/modules/cross_entropy_smooth.py django/opts.py logical/evaluate.py django/table/Loss.py logical/table/modules/__init__.py wikisql/table/ModelConstructor.py django/table/modules/WeightNorm.py django/evaluate.py logical/table/modules/UtilClass.py main translate_opts model_opts train_opts preprocess_opts main train_model build_optim build_model get_save_index report_func main load_fields SCode is_code_eq Beam GNMTGlobalScorer join_dicts get_tgt_mask __setstate__ merge_vocabs _preprocess_json get_lay_index OrderedIterator get_parent_index get_tgt_loss filter_counter TableDataset __getstate__ read_anno_json LossCompute make_encoder make_base_model make_embeddings make_layout_encoder make_q_co_attention make_lay_co_attention make_decoder make_word_embeddings CopyGenerator LayCoAttention _build_rnn encode_unsorted_batch ParserModel RNNDecoderState RNNEncoder CoAttention QCoAttention SeqDecoder DecoderState Optim ParseResult count_accuracy Statistics Trainer aggregate_accuracy _debug_batch_content count_token_prune_accuracy expand_layout_with_skip get_decode_batch_length recover_layout_token recover_target_token cpu_vector Translator v_eval topk set_seed add_pad aeq sort_for_pack argmax PartUpdateEmbedding embedded_dropout ContextGateFactory SourceContextGate ContextGate TargetContextGate BothContextGate GlobalAttention LockedDropout StackedLSTM StackedGRU BottleLinear LayerNorm Elementwise BottleSoftmax Bottle2 BottleLayerNorm Bottle WeightDrop WeightNormLinear get_var_maybe_avg WeightNormConv2d WeightNormConvTranspose2d get_vars_maybe_avg merge_bpe BpePair BpeProcessor count_pair learn_bpe recover_bpe main get_run_epoch_by_fn translate_opts model_opts train_opts preprocess_opts main train_model build_optim build_model get_save_index report_func main load_fields is_tree_eq STree norm_tree_var Beam GNMTGlobalScorer join_dicts get_tgt_mask __setstate__ merge_vocabs _preprocess_json get_lay_index OrderedIterator data_aug_by_permute_order get_parent_index get_tgt_loss TableDataset __getstate__ read_anno_json LossCompute make_encoder make_base_model make_embeddings make_layout_encoder make_q_co_attention make_lay_co_attention make_decoder make_word_embeddings LayCoAttention _build_rnn DecoderState encode_unsorted_batch ParserModel RNNDecoderState RNNEncoder CoAttention QCoAttention SeqDecoder SeqDecoderParentFeedInput Optim ParseResult count_accuracy Statistics Trainer aggregate_accuracy _debug_batch_content count_token_prune_accuracy expand_layout_with_skip recover_layout_token get_decode_batch_length mix_lay_and_tgt recover_target_token cpu_vector Translator v_eval set_seed add_pad aeq sort_for_pack argmax PartUpdateEmbedding embedded_dropout ContextGateFactory SourceContextGate ContextGate TargetContextGate BothContextGate GlobalAttention LockedDropout StackedLSTM StackedGRU BottleLinear LayerNorm Elementwise BottleSoftmax Bottle2 BottleLayerNorm Bottle WeightDrop WeightNormLinear get_var_maybe_avg WeightNormConv2d WeightNormConvTranspose2d get_vars_maybe_avg annotate is_valid_example annotate_example main translate_opts model_opts train_opts preprocess_opts main train_model build_optim build_model get_save_index report_func main load_fields detokenize count_lines DBEngine Query Table Beam GNMTGlobalScorer join_dicts __setstate__ merge_vocabs OrderedIterator TableDataset __getstate__ read_anno_json TableLossCompute make_encoder make_base_model make_table_encoder make_embeddings make_co_attention make_cond_decoder make_word_embeddings CondMatchScorer _build_rnn encode_unsorted_batch CondDecoder TableRNNEncoder ParserModel RNNDecoderState RNNEncoder CoAttention MatchScorer DecoderState Optim ParseResult count_accuracy Statistics aggregate_accuracy Trainer Translator v_eval cpu_vector set_seed add_pad aeq sort_for_pack argmax _is_long onehot cross_entropy CrossEntropyLossSmooth PartUpdateEmbedding ContextGateFactory SourceContextGate ContextGate TargetContextGate BothContextGate GlobalAttention LockedDropout StackedLSTM StackedGRU BottleLinear LayerNorm Elementwise BottleSoftmax Bottle2 BottleLayerNorm Bottle WeightDrop WeightNormLinear get_var_maybe_avg WeightNormConv2d WeightNormConvTranspose2d get_vars_maybe_avg anno ArgumentParser fields read_anno_json sum format __dict__ glob TableDataset eval zip model_path OrderedIterator Translator train_opts print sort translate model_opts len add_argument add_argument add_argument add_argument join build_vocab save_vocab save_data valid_anno permute_order test_anno save open train_anno get_fields exists exists Statistics output validate drop_checkpoint print train epoch_step accuracy Trainer start_epoch fix_word_vecs OrderedIterator set_update epochs cuda range load join data train_from print dict print make_base_model learning_rate Optim train_from print set_parameters parameters max_grad_norm alpha load_state_dict optim state_dict load data train_model build_optim batch_size train_from build_model load_fields join zip isinstance str append pop startswith enumerate append append zip update defaultdict stoi items list Counter Counter layout SCode target vectors load_vectors Embedding word_vec_size PartUpdateEmbedding special_token_list copy_ fix_word_vecs zero_ len Embedding len q_co_attention lay_co_attention global_attention CopyGenerator Sequential dropout_i LogSoftmax Dropout dec_layers rnn_size vocab lock_dropout dropout SeqDecoder copy_prb Linear rnn_type weight_dropout brnn dropword_dec attn_hidden len make_encoder Sequential make_q_co_attention cuda make_word_embeddings make_embeddings make_decoder seprate_encoder load_state_dict Dropout rnn_size ent_vec_size vocab dropout no_share_emb_layout_encoder Linear print ParserModel make_layout_encoder decoder_input_size special_token_list make_lay_co_attention no_lay_encoder layout_token_prune len WeightDrop Variable index_select sort_for_pack encoder cuda ne sum numel eq masked_select argmax prod ne numel expand_as prod masked_select sum long append prod append size print range append range append float size range append range get_tgt_mask get_lay_index extend t append next seed manual_seed list zip append max len max_norm sparse padding_idx Variable norm_type scale_grad_by_freq apply expand_as weight getattr append get_var_maybe_avg get all_bpe_pairs apply_bpe items list merge_bpe count_pair append max range startswith split bpe_path BpeProcessor bpe_min_freq learn_bpe bpe_num_merge append to_list enumerate str str STree isinstance dataset STree split str _preprocess_json STree set permute append range parent_feed_hidden SeqDecoderParentFeedInput bpe append zip min len SKP_WORD int startswith after word originalText append CoreNLPClient deepcopy join format str annotate print format set db_file DBEngine zip compile sum GloVe rnn_size co_attention make_co_attention cond_op_vec_size CondMatchScorer score_size LogSoftmax make_cond_decoder make_table_encoder MatchScorer data list isinstance Variable size scatter_ masked_fill_ eq unsqueeze zero_ max data hasattr size type_as mean masked_fill_ eq unsqueeze _is_long sum lerp
# [Coarse-to-Fine Decoding for Neural Semantic Parsing](http://homepages.inf.ed.ac.uk/s1478528/acl18-coarse2fine.pdf) ## Setup ### Requirements - Python 3.5 - [PyTorch 0.2.0.post3](https://pytorch.org/previous-versions/) (GPU) ### Install Python dependency
1,936
donglixp/confidence
['semantic parsing']
['Confidence Modeling for Neural Semantic Parsing']
utils/utils.py onmt/Tree.py onmt/modules/__init__.py utils/EvalInfo.py train.py onmt/modules/GlobalAttention.py onmt/modules/SeqDropout.py eval_conf_bp.py utils/analysis.py PTB_Tree_eval.py onmt/Optim.py evaluate.py onmt/__init__.py onmt/Dataset.py onmt/Beam.py onmt/Constants.py onmt/Dict.py preprocess.py onmt/modules/FuncRNN.py onmt/modules/AddNoise.py onmt/Translator.py utils/feature.py onmt/Models.py ifttt_f1_metric is_tree_eq decompose_ifttt_tgt evaluate_main get_epoch_from_model_path split_at_least is_py_eq compute_spearmanr_score compute_intersection_score eval_func compute_KL_score eval_main makeData makeVocabulary saveVocabulary initVocabulary main PTB_Tree_eval quota_normalize NMTCriterion get_save_index eval main trainModel memoryEfficientLoss Beam Dataset Dict StackedLSTM Decoder NMTModel Encoder Optim Translator recover_order _var get_noise_type Tree AddNoise FuncLinear VariableRecurrentReverse VariableRecurrent Recurrent LSTMCell StackedRNN AutogradRNN variable_recurrent_factory FuncRNN GlobalAttention SeqDropout convert_conf_feature_matrix plot_feature_importance plot_conf_score_vs_f1 wrap_multiple_col summurize_result spearmanr_scorer get_xgb_feature_importance confidence_main FeatureManager num_nan norm_by_sum is_valid_by_eval_type_ifttt trim_tensor_by_length line_iter safe_numpy_div softmax spearmanr_significance_test get_split norm_by_max add_eps_ list_topk add_eps norm_to_range float sum len init_from_str split strip split_at_least confidence_bp initBeamAccum confidence verbose line_iter dump_beam exists open count list tgt tolist len Model lookup pprint dirname append beam_accum sum range lm_path confidence_each_word dump reset_dropout_rate glob close set mean lower zip model_path Translator float copy_unk flush enumerate load join items ifttt_f1_metric src print sort min write translate dict tqdm getLabel n_best dropout_rate decompose_ifttt_tgt split array softmax norm_to_range spearmanr int sorted compute_score_func mean startswith append keys print list metric eval_func prune print size prune_by_freq Dict str makeVocabulary print size Dict loadFile print writeFile str readline print sort strip close len randperm split Tensor open save makeData tgt_vocab initVocabulary test_tgt tgt_min_freq train_tgt valid_tgt src_vocab Dict valid_src save_data train_src tgt_vocab_size src_vocab_size src_min_freq test_src saveVocabulary print startswith exists ones NLLLoss cuda gpus data generator view backward Variable size max_generator_batches zip sum crit enumerate split generator model train memoryEfficientLoss range len generator model zero_grad Logger save memoryEfficientLoss exp epochs randperm sum range updateLearningRate save_path size shuffle log_value eval start_epoch float NMTCriterion join time backward print min train step len data Optim batch_size Sequential DataParallel max_grad_norm cuda NMTModel LogSoftmax load_state_dict rnn_size sum state_dict train_from load_pretrained_vectors size encoder_type Encoder alpha train_from_state_dict optim Linear load learning_rate gpus set_parameters Decoder trainModel parameters cpu Dataset len t mm sigmoid tanh chunk clone len StackedRNN variable_recurrent_factory spearmanr append map2vec conf subplots grid clf xticks yticks sorted list ylabel bar ylim savefig legend range reversed set_alpha xlim xlabel array len float get_dump split subplots arange set_yticklabels strip grid clf list barh set_xlabel savefig append norm_by_max update set_xlim startswith zip keys int items print set_yticks dict array set_ylim len kendalltau XGBRegressor spearmanr list FeatureManager expand_with_small_noise append predict set_valid_uncertainty_type shuffle keys enumerate convert_conf_feature_matrix plot_feature_importance plot_conf_score_vs_f1 GridSearchCV print best_estimator_ significance_test array fit append sort list split append max range len masked_fill_ eq mul_ sign print src exp max append spearmanr range choice
# [Confidence Modeling for Neural Semantic Parsing](http://homepages.inf.ed.ac.uk/s1478528/acl18-confidence.pdf) ## Setup ### Requirements - Python 2.7 - [PyTorch 0.1.12.post2](https://pytorch.org/previous-versions/) (GPU) ### Install Python dependency
1,937
donglixp/lang2logic
['semantic parsing']
['Language to Logical Form with Neural Attention']
pull_data.py
# Setup - If you have already installed Torch7, please rename its folder name. ```sh mv ~/torch ~/torch_bak ``` - Download Torch7 ```sh git clone https://github.com/torch/distro.git ~/torch --recursive cd ~/torch; bash install-deps; ```
1,938
dongyp13/Non-Targeted-Adversarial-Attacks
['adversarial attack']
['Boosting Adversarial Attacks with Momentum']
nets/overfeat_test.py nets/inception_v3.py nets/vgg.py nets/inception_v4.py nets/inception_v2.py nets/inception_resnet_v2_test.py nets/lenet.py nets/inception_v1.py nets/mobilenet_v1_test.py nets/resnet_utils.py nets/inception_resnet_v2.py nets/resnet_v2_test.py nets/cifarnet.py nets/alexnet.py nets/inception_v4_test.py nets/inception.py nets/overfeat.py nets/inception_utils.py nets/vgg_test.py nets/inception_v1_test.py nets/resnet_v1_test.py nets/resnet_v2.py nets/inception_v2_test.py nets/nets_factory_test.py nets/alexnet_test.py nets/inception_v3_test.py nets/resnet_v1.py attack_iter.py nets/mobilenet_v1.py nets/nets_factory.py save_images graph load_images stop main alexnet_v2 alexnet_v2_arg_scope AlexnetV2Test cifarnet_arg_scope cifarnet inception_resnet_v2_arg_scope inception_resnet_v2 inception_resnet_v2_base block8 block35 block17 InceptionTest inception_arg_scope inception_v1_base inception_v1 InceptionV1Test inception_v2_base _reduced_kernel_size_for_small_input inception_v2 InceptionV2Test inception_v3 _reduced_kernel_size_for_small_input inception_v3_base InceptionV3Test inception_v4 block_reduction_b inception_v4_base block_inception_b block_inception_c block_reduction_a block_inception_a InceptionTest lenet lenet_arg_scope mobilenet_v1_arg_scope mobilenet_v1 _reduced_kernel_size_for_small_input mobilenet_v1_base wrapped_partial MobilenetV1Test get_network_fn NetworksTest overfeat overfeat_arg_scope OverFeatTest Block conv2d_same subsample resnet_arg_scope stack_blocks_dense resnet_v1_152 resnet_v1_101 bottleneck resnet_v1_200 resnet_v1_50 resnet_v1 resnet_v1_block ResnetUtilsTest ResnetCompleteNetworkTest create_test_input resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 ResnetUtilsTest ResnetCompleteNetworkTest create_test_input vgg_16 vgg_arg_scope vgg_a vgg_19 VGG16Test VGGATest VGG19Test join basename Glob append zeros enumerate one_hot abs num_iter momentum sign add int64 reduce_mean cast clip_by_value max_epsilon argmax equal softmax_cross_entropy num_iter max_epsilon set_verbosity INFO batch_norm as_list prediction_fn as_list partial update_wrapper l2_regularizer truncated_normal_initializer hasattr default_image_size pad
# Non-Targeted-Adversarial-Attacks ## Introduction This repository contains the code for the top-1 submission to [NIPS 2017: Non-targeted Adversarial Attacks Competition](https://www.kaggle.com/c/nips-2017-non-targeted-adversarial-attack). ## Method We propose a momentum iterative method to generate more transferable adversarial examples. We summarize our algorithm in [Boosting Adversarial Attacks with Momentum](https://arxiv.org/pdf/1710.06081.pdf) (CVPR 2018, Spotlight). Basically, the update rule of momentum iterative method is: ![equation](http://latex.codecogs.com/gif.latex?g_%7Bt&plus;1%7D%20%3D%20%5Cmu%20%5Ccdot%20g_%7Bt%7D%20&plus;%20%5Cfrac%7B%5Cnabla_%7Bx%7DJ%28x_%7Bt%7D%5E%7B*%7D%2Cy%29%7D%7B%5C%7C%5Cnabla_%7Bx%7DJ%28x_%7Bt%7D%5E%7B*%7D%2Cy%29%5C%7C_1%7D%2C%20%5Cquad%20x_%7Bt&plus;1%7D%5E%7B*%7D%20%3D%20%5Cmathrm%7Bclip%7D%28x_%7Bt%7D%5E%7B*%7D%20&plus;%20%5Calpha%5Ccdot%5Cmathrm%7Bsign%7D%28g_%7Bt&plus;1%7D%29%29) ### Citation If you use momentum iterative method for attacks in your research, please consider citing @inproceedings{dong2018boosting,
1,939
dongyp13/Targeted-Adversarial-Attack
['adversarial attack']
['Boosting Adversarial Attacks with Momentum']
nets/overfeat_test.py nets/inception_v3.py nets/vgg.py target_attack.py nets/inception_v4.py nets/inception_v2.py nets/inception_resnet_v2_test.py nets/lenet.py nets/inception_v1.py nets/mobilenet_v1_test.py nets/resnet_utils.py nets/inception_resnet_v2.py nets/resnet_v2_test.py nets/cifarnet.py nets/alexnet.py nets/inception_v4_test.py nets/inception.py nets/overfeat.py nets/inception_utils.py nets/vgg_test.py nets/inception_v1_test.py nets/resnet_v1_test.py nets/resnet_v2.py nets/inception_v2_test.py nets/nets_factory_test.py nets/alexnet_test.py nets/inception_v3_test.py nets/resnet_v1.py nets/mobilenet_v1.py nets/nets_factory.py stop_large save_images graph_large load_target_class graph_small load_images stop_small main alexnet_v2 alexnet_v2_arg_scope AlexnetV2Test cifarnet_arg_scope cifarnet inception_resnet_v2_arg_scope inception_resnet_v2 inception_resnet_v2_base block8 block35 block17 InceptionTest inception_arg_scope inception_v1_base inception_v1 InceptionV1Test inception_v2_base _reduced_kernel_size_for_small_input inception_v2 InceptionV2Test inception_v3 _reduced_kernel_size_for_small_input inception_v3_base InceptionV3Test inception_v4 block_reduction_b inception_v4_base block_inception_b block_inception_c block_reduction_a block_inception_a InceptionTest lenet lenet_arg_scope mobilenet_v1_arg_scope mobilenet_v1 _reduced_kernel_size_for_small_input mobilenet_v1_base wrapped_partial MobilenetV1Test get_network_fn NetworksTest overfeat overfeat_arg_scope OverFeatTest Block conv2d_same subsample resnet_arg_scope stack_blocks_dense resnet_v1_152 resnet_v1_101 bottleneck resnet_v1_200 resnet_v1_50 resnet_v1 resnet_v1_block ResnetUtilsTest ResnetCompleteNetworkTest create_test_input resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_block resnet_v2_152 bottleneck resnet_v2 ResnetUtilsTest ResnetCompleteNetworkTest create_test_input vgg_16 vgg_arg_scope vgg_a vgg_19 VGG16Test VGGATest VGG19Test join basename Glob append zeros enumerate one_hot reshape momentum add clip_by_value max_epsilon round std softmax_cross_entropy one_hot reshape momentum add clip_by_value max_epsilon round std softmax_cross_entropy load_target_class set_verbosity input_dir max_epsilon INFO batch_norm as_list prediction_fn as_list partial update_wrapper l2_regularizer truncated_normal_initializer hasattr default_image_size pad
# Targeted-Adversarial-Attack ## Introduction This repository contains the code for the top-1 submission to [NIPS 2017: Targeted Adversarial Attacks Competition](https://www.kaggle.com/c/nips-2017-targeted-adversarial-attack). ## Method We use the momentum iterative method to generate adversarial examples. We summarize our algorithm in [Boosting Adversarial Attacks with Momentum](https://arxiv.org/pdf/1710.06081.pdf) (CVPR 2018, Spotlight). We notice that targeted attacks have little transferability. The finding is drawn not only from our experiments but also from other submissions to this competition. We think that it's hard to find transferable adversarial examples for the ImageNet dataset with a large number of classes (i.e., 1000), because the decision boundary between two classes may not exhibit the same properties for different models. ### Citation If you use momentum iterative method for attacks in your research, please consider citing @inproceedings{dong2018boosting, title={Boosting Adversarial Attacks with Momentum},
1,940
dongzelian/multi-view-gaze
['gaze estimation']
['Appearance-Based Gaze Estimation in the Wild']
code/tools/utils.py code/Train_Single_View_ST.py code/network/gazenet.py code/network/resnet.py code/Train_Multi_View_ST.py code/Train_Multi_View_Multi_Task_ST_MPII.py GazeImageDataset compute_error test save_checkpoint adjust_learning_rate train compute_angle_error MPIIGazeDataset GazeImageDataset compute_error AverageMeter test save_checkpoint adjust_learning_rate train GazeImageDataset compute_error AverageMeter test save_checkpoint adjust_learning_rate train GazeNet ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 txt2list AverageMeter infinite_get model zero_grad localtime infinite_get cuda view strftime iter update format size avg info item enumerate time compute_error criterion backward add_scalar AverageMeter step compute_angle_error len AverageMeter save param_groups lr_decay lr load_url ResNet load_state_dict load update ResNet load_state_dict state_dict load update ResNet load_state_dict state_dict load_url ResNet load_state_dict load_url ResNet load_state_dict next
# Multi-View-Gaze "Multi-view Multi-task Gaze Estimation with Deep Convolutional Neural Networks" This paper is accepted by IEEE Transactions on Neural Networks and Learning Systems (TNNLS) 2018. Our ShanghaiTechGaze dataset can be downloaded from [OneDrive](https://yien01-my.sharepoint.com/:u:/g/personal/doubility_z0_tn/EaDL9AkP5QdLgsOpmDw06K0BZqF0smTHMNOiH3ZMEk3WoA?e=VaKWeg). About MPIIGaze dataset, please refer to the paper: "[Appearance-Based Gaze Estimation in the Wild](https://arxiv.org/pdf/1504.02863.pdf)". About UT Multiview dataset, please refer to the paper: "[Learning-by-Synthesis for Appearance-based 3D Gaze Estimation](https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=6909631)". # Requirements - python >= 3.6 - pytorch >= 0.4.1 - tensorboardX >= 1.4
1,941
dongzhuoyao/3D-ResNets-PyTorch
['action recognition']
['Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?']
geotnf/cnn_geometric_model.py utils/eval_ucf101.py preprocess/convert_davis.py utils/logger.py models/resnet.py utils/video_jpg.py dataset_utils.py generate_filelist.py opts.py models/videos/inflate.py preprocess/gendavis_vallist.py utils/misc.py models/resnext.py train.py utils/transforms.py datasets/hmdb51.py args.py dataset.py geotnf/point_tnf.py models/wide_resnet.py models/dataset/vlog_train.py models/densenet.py models/videos/inflated_resnet.py models/videos/model_test.py utils/torch_util.py utils/ucf101_json.py utils/eval_kinetics.py datasets/activitynet.py utils/imutils2.py geotnf/flow.py utils/__init__.py models/dataset/davis_test.py models/videos/model_simple.py models/pre_act_resnet.py temporal_transforms.py test.py utils/kinetics_json.py datasets/ucf101.py utils/hmdb51_json.py utils/n_frames_ucf101_hmdb51.py mean.py preprocess/genvloglist.py datasets/kinetics.py preprocess/downscale_video_joblib.py main.py models/videos/resnet_res4s1.py target_transforms.py model.py utils/n_frames_kinetics.py geotnf/loss.py geotnf/transformation.py utils/video_jpg_ucf101_hmdb51.py eval_hmdb51.py utils/fps.py utils/visualize.py validation.py spatial_transforms.py preprocess/extract_jpegs_256.py train_video_cycle_simple.py utils/video_jpg_kinetics.py str_to_bool parse_opts get_training_set get_test_set get_validation_set calculate_accuracy AverageMeter Logger load_value_file HMDBclassification compute_video_hit_at_k eval_hmdb51 get_std get_mean generate_model str_to_bool parse_opts MultiScaleCornerCrop CenterCrop MultiScaleRandomCrop ToTensor Compose Scale Normalize RandomHorizontalFlip CornerCrop ClassLabel VideoID Compose TemporalBeginCrop LoopPadding TemporalCenterCrop TemporalRandomCrop MyEncoder calculate_video_results test train_video_cycle save_checkpoint train set_bn_eval partial_load modify_frame_indices get_class_labels load_annotation_data video_loader get_end_t make_dataset ActivityNet accimage_loader get_default_image_loader get_default_video_loader make_untrimmed_dataset pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader HMDB51 get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations get_class_labels load_annotation_data video_loader make_dataset accimage_loader Kinetics get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations UCF101 get_class_labels load_annotation_data video_loader make_dataset accimage_loader get_default_image_loader get_default_video_loader pil_loader get_video_names_and_annotations CNNGeometric FeatureExtraction FeatureRegression featureL2Norm FeatureCorrelation TwoStageCNNGeometric th_sampling_grid_to_np_flow write_flo_file read_flo_file warp_image np_flow_to_th_sampling_grid WeakInlierCountPool TransformedGridLoss unnormalize_axis PointTnf PointsToUnitCoords normalize_axis PointsToPixelCoords GeometricTnfAffine AffineGridGen GeometricTnf TpsGridGen AffineGridGenV3 AffineGridGenV2 get_fine_tuning_parameters DenseNet densenet201 densenet169 densenet264 _DenseLayer _DenseBlock _Transition densenet121 conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block resnet152 PreActivationBasicBlock resnet34 resnet200 PreActivationBottleneck resnet18 PreActivationResNet resnet101 conv3x3x3 get_fine_tuning_parameters ResNet downsample_basic_block resnet50 Bottleneck resnet152 resnet34 resnet200 resnet18 resnet10 BasicBlock resnet101 ResNeXtBottleneck conv3x3x3 get_fine_tuning_parameters resnet50 downsample_basic_block ResNeXt resnet152 resnet101 conv3x3x3 get_fine_tuning_parameters WideBottleneck resnet50 downsample_basic_block WideResNet DavisSet VlogSet inflate_batch_norm inflate_pool inflate_conv inflate_linear BasicBlock3d InflatedResNet inflate_downsample inflate_reslayer CycleTime CycleTime ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 download_clip download_clip_wrapper download_clip download_clip_wrapper get_blocked_videos KINETICSclassification compute_video_hit_at_k UCFclassification compute_video_hit_at_k convert_hmdb51_csv_to_activitynet_json get_labels convert_csv_to_dict im_to_torch resize_label im_to_numpy Lambda Compose normalize_batch resize unnormalize_batch load_image ColorJitter load_labels convert_kinetics_csv_to_activitynet_json convert_csv_to_dict plot_overlap savefig Logger LoggerMonitor to_torch get_mean_and_std AverageMeter init_params mkdir_p to_numpy class_process class_process str_to_bool default_collate save_checkpoint BatchTensorToVars collate_custom Softmax1D expand_dim transform transform_preds get_transform crop flip_back color_normalize shufflelr fliplr load_labels convert_ucf101_csv_to_activitynet_json convert_csv_to_dict class_process class_process make_image show_mask_single show_mask gauss colorize show_batch parse_args add_argument ArgumentParser video_path UCF101 ActivityNet Kinetics annotation_path HMDB51 video_path UCF101 n_val_samples ActivityNet Kinetics annotation_path HMDB51 video_path UCF101 ActivityNet Kinetics annotation_path HMDB51 topk view size t eq HMDBclassification evaluate reset_index size tolist mean unique zeros values enumerate get_fine_tuning_parameters in_features densenet264 DataParallel ft_begin_index resnet34 resnet152 cuda load_state_dict resnet200 resnet101 resnet18 state_dict update format resnet50 resnet10 n_finetune_classes Linear load densenet169 densenet201 print pretrain_path densenet121 set_defaults topk size mean stack append range update time format model print Variable cpu AverageMeter size eval __version__ softmax calculate_video_results append range enumerate len update load_state_dict state_dict CycleTime SGD gpu_id pretrained DataLoader save_checkpoint Logger cuda seed str list path_checkpoint Adam dirname append sum range partial_load manual_seed_all close u_wd resume manual_seed is_available load join u_momentum print manualSeed parameters VlogSet randint train epochs set_names eval __name__ data model zero_grad cuda lamda sum update format size clip_grad_norm enumerate time backward print Variable AverageMeter dict parameters step loss len str list join save keys join format image_loader append exists get_default_image_loader append enumerate append items list format append join format items list format join get_class_labels deepcopy load_annotation_data print modify_frame_indices len load_value_file ceil max range append get_video_names_and_annotations sort listdir items list format join get_class_labels deepcopy load_annotation_data print modify_frame_indices len load_value_file get_end_t ceil max range append get_video_names_and_annotations int min expand_as print close float32 int32 resize fromfile open tofile astype float32 close array open uint8 grid_sample Variable astype unsqueeze np_flow_to_th_sampling_grid list concatenate Variable unsqueeze meshgrid cuda range normalize_axis unnormalize_axis list concatenate squeeze meshgrid numpy range clone normalize_axis expand_as unnormalize_axis clone expand_as DenseNet DenseNet DenseNet DenseNet append format range named_parameters data isinstance FloatTensor Variable zero_ avg_pool3d cuda cat PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet PreActivationResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNet ResNeXt ResNeXt ResNeXt WideResNet data Parameter out_channels Conv3d in_channels bias repeat zeros Parameter in_features bias repeat out_features Linear BatchNorm3d num_features _check_input_dim AvgPool2d isinstance MaxPool2d AvgPool3d MaxPool3d BasicBlock3d append inflate_batch_norm inflate_conv Sequential load_url load_state_dict load_url load_state_dict load_url load_state_dict load_url load_state_dict load_url load_state_dict check_output format exists download_clip makedirs Request urlopen format ceil join read_csv append listdir range len append join listdir update get_labels convert_csv_to_dict to_numpy transpose float transpose imread astype float32 copy to_numpy float resize im_to_torch im_to_numpy zeros shape zeros shape read_csv update load_labels convert_csv_to_dict asarray arange plot numbers enumerate len is_tensor print DataLoader div_ zeros range len normal constant isinstance kaiming_normal Conv2d bias modules BatchNorm2d weight Linear makedirs join int print sort append listdir is_tensor list sum isinstance Sequence new zip _new_shared Mapping is_tensor Mapping isinstance exp unsqueeze basename copyfile dirname makedirs size list repeat sub_ zip div_ print numpy fliplr copy print clone transpose range copy pi dot eye zeros float dot get_transform inv T transform size to_torch range im_to_torch int norm imresize im_to_numpy imrotate floor array transform zeros float max split append range update load_labels convert_csv_to_dict format call mkdir splitext exists numpy range zeros unsqueeze gauss show make_image imshow make_grid make_image subplot make_grid size clone axis upsampling imshow expand_as range make_image subplot make_grid size clone axis upsampling imshow expand_as cpu range len
for example scratch split 2 python3 main.py --root_path ~/data --video_path hmdb_videos/jpg --annotation_path hmdb51_2.json --result_path results_scratch_2 --no_val --test --eval scratch split 2 unsupervised pretraining.. python3 main.py --unsupervised_pretrain --data ~/data/hmdb_videos/jpg --epochs 100 --path_checkpoint ~/data/timecycle_checkpoint_2 --list hmdb_2.txt --root_path home/martine/data --pretrain_path timecycle_checkpoint_2/checkpoint_100.pth --annotation_path hmdb51_2.json --result_path results_timecycle_2 --no_val --test --learning_rate 0.001 --weight_decay 0.00001 --ft_begin_index 4 --eval ____________________ # 3D ResNets for Action Recognition ## Update (2018/2/21) Our paper "Can Spatiotemporal 3D CNNs Retrace the History of 2D CNNs and ImageNet?" is accepted to CVPR2018! We update the paper information.
1,942
donnjonn/Masterproef
['person re identification']
['Omni-Scale Feature Learning for Person Re-Identification']
torchreid/models/senet.py torchreid/data/datasets/image/cuhk03.py torchreid/data/datasets/image/ilids.py torchreid/optim/optimizer.py torchreid/utils/loggers.py torchreid/models/__init__.py torchreid/engine/video/softmax.py torchreid/data/datasets/image/market1501.py torchreid/metrics/__init__.py torchreid/data/datamanager.py torchreid/data/datasets/video/mars.py torchreid/losses/__init__.py torchreid/engine/image/triplet.py torchreid/engine/engine.py torchreid/data/datasets/image/cuhk01.py torchreid/models/osnet.py setup.py torchreid/models/resnetmid.py torchreid/engine/image/__init__.py torchreid/data/datasets/image/msmt17.py torchreid/data/datasets/video/__init__.py torchreid/utils/reidtools.py docs/conf.py torchreid/models/resnet.py torchreid/models/shufflenet.py torchreid/data/datasets/image/cuhk02.py torchreid/engine/__init__.py torchreid/engine/video/triplet.py torchreid/optim/__init__.py torchreid/optim/lr_scheduler.py torchreid/models/pcb.py scripts/main.py torchreid/utils/rerank.py torchreid/data/datasets/image/prid.py torchreid/models/xception.py torchreid/losses/hard_mine_triplet_loss.py torchreid/data/datasets/dataset.py torchreid/data/datasets/video/ilidsvid.py train_patch.py torchreid/data/datasets/image/__init__.py torchreid/data/datasets/video/prid2011.py torchreid/engine/video/__init__.py torchreid/__init__.py torchreid/models/mlfn.py torchreid/metrics/rank_cylib/setup.py torchreid/data/datasets/image/grid.py torchreid/data/datasets/image/sensereid.py torchreid/models/inceptionresnetv2.py torchreid/models/mobilenetv2.py torchreid/models/hacnn.py scripts/default_config.py deprecated/main.py torchreid/metrics/distance.py torchreid/data/datasets/video/dukemtmcvidreid.py torchreid/engine/image/softmax.py torchreid/models/mudeep.py torchreid/metrics/rank.py torchreid/utils/tools.py torchreid/models/squeezenet.py torchreid/models/nasnet.py torchreid/models/inceptionv4.py torchreid/data/transforms.py torchreid/utils/__init__.py torchreid/models/shufflenetv2.py torchreid/utils/model_complexity.py torchreid/data/datasets/image/dukemtmcreid.py torchreid/data/sampler.py torchreid/losses/cross_entropy_loss.py torchreid/models/densenet.py torchreid/utils/avgmeter.py torchreid/metrics/accuracy.py torchreid/data/__init__.py torchreid/data/datasets/__init__.py torchreid/data/datasets/image/viper.py torchreid/utils/torchtools.py deprecated/default_parser.py torchreid/metrics/rank_cylib/test_cython.py find_version readme get_requirements numpy_include tester engine_run_kwargs init_parser optimizer_kwargs videodata_kwargs imagedata_kwargs lr_scheduler_kwargs main build_datamanager build_engine engine_run_kwargs optimizer_kwargs videodata_kwargs get_default_config imagedata_kwargs lr_scheduler_kwargs main build_datamanager build_engine reset_config ImageDataManager VideoDataManager DataManager RandomIdentitySampler build_train_sampler RandomErasing ColorAugmentation Random2DTranslation RandomPatch build_transforms ImageDataset Dataset VideoDataset register_video_dataset init_image_dataset register_image_dataset init_video_dataset CUHK01 CUHK02 CUHK03 DukeMTMCreID GRID iLIDS Market1501 MSMT17 PRID SenseReID VIPeR DukeMTMCVidReID iLIDSVID Mars PRID2011 Engine ImageSoftmaxEngine ImageTripletEngine VideoSoftmaxEngine VideoTripletEngine CrossEntropyLoss TripletLoss DeepSupervision accuracy cosine_distance euclidean_squared_distance compute_distance_matrix eval_market1501 evaluate_py eval_cuhk03 evaluate_rank numpy_include densenet161 DenseNet densenet169 densenet201 init_pretrained_weights densenet121_fc512 _DenseLayer _DenseBlock _Transition densenet121 HACNN InceptionB ChannelAttn SoftAttn SpatialAttn HarmAttn HardAttn InceptionA ConvBlock Block17 Block8 Mixed_6a Mixed_5b BasicConv2d InceptionResNetV2 inceptionresnetv2 Block35 Mixed_7a Mixed_4a Mixed_5a Reduction_B Inception_B init_pretrained_weights BasicConv2d Inception_A Reduction_A Mixed_3a Inception_C inceptionv4 InceptionV4 MLFNBlock mlfn MLFN init_pretrained_weights mobilenetv2_x1_0 init_pretrained_weights Bottleneck mobilenetv2_x1_4 ConvBlock MobileNetV2 Reduction ConvLayers MultiScaleB MultiScaleA MuDeep Fusion ConvBlock NormalCell BranchSeparablesStem AvgPoolPad ReductionCell1 ReductionCell0 MaxPoolPad init_pretrained_weights nasnetamobile SeparableConv2d BranchSeparables CellStem0 FirstCell BranchSeparablesReduction CellStem1 NASNetAMobile Conv1x1 osnet_x0_5 osnet_x1_0 OSNet init_pretrained_weights Conv3x3 Conv1x1Linear ConvLayer ChannelGate osnet_x0_25 LightConv3x3 osnet_ibn_x1_0 OSBlock osnet_x0_75 pcb_p6 init_pretrained_weights Bottleneck pcb_p4 conv3x3 PCB BasicBlock DimReduceLayer conv1x1 resnext50_32x4d ResNet resnet50 init_pretrained_weights resnext101_32x8d Bottleneck resnet152 resnet50_fc512 conv3x3 resnet34 resnet18 BasicBlock resnet101 ResNetMid resnet50mid init_pretrained_weights Bottleneck conv3x3 BasicBlock se_resnext50_32x4d senet154 SENet SEResNetBottleneck SEBottleneck SEResNeXtBottleneck se_resnet50_fc512 init_pretrained_weights Bottleneck se_resnet152 se_resnet50 se_resnext101_32x4d SEModule se_resnet101 shufflenet ShuffleNet init_pretrained_weights Bottleneck ChannelShuffle shufflenet_v2_x2_0 shufflenet_v2_x1_5 InvertedResidual init_pretrained_weights shufflenet_v2_x1_0 channel_shuffle shufflenet_v2_x0_5 ShuffleNetV2 SqueezeNet squeezenet1_1 squeezenet1_0_fc512 init_pretrained_weights Fire squeezenet1_0 Block init_pretrained_weights xception SeparableConv2d Xception show_avai_models build_model build_lr_scheduler build_optimizer AverageMeter RankLogger Logger hook_maxpool3d hook_adapavgpool1d hook_leakyrelu hook_relu hook_avgpool2d hook_adapmaxpool2d hook_batchnormNd hook_layernorm hook_maxpool1d hook_adapmaxpool3d compute_model_complexity hook_adapavgpool3d hook_instancenormNd hook_convNd hook_avgpool1d hook_avgpool3d hook_adapmaxpool1d _get_flops_counter _ntuple hook_groupnorm hook_maxpool2d hook_linear hook_adapavgpool2d visualize_ranked_results re_ranking check_isfile collect_env_info read_json download_url set_random_seed write_json read_image mkdir_if_missing resume_from_checkpoint load_checkpoint set_bn_to_eval count_num_param load_pretrained_weights save_checkpoint adjust_learning_rate open_all_layers open_specified_layers get_include realpath dirname _extract_features extend _parse_data_for_eval cpu append add_argument ArgumentParser ImageTripletEngine VideoTripletEngine ImageSoftmaxEngine VideoSoftmaxEngine resume_from_checkpoint app warn set_random_seed Logger gpu_devices arch save_dir cuda run seed build_datamanager list collect_env_info build_lr_scheduler build_optimizer build_engine format build_model compute_model_complexity load_pretrained_weights load_weights resume keys join print sort loss CN root transforms sources targets get_default_config ArgumentParser opts name parse_args merge_from_file use_gpu config_file merge_from_list is_available type add_argument reset_config RandomIdentitySampler RandomSampler int format isinstance print Compose Normalize round list keys list keys list keys list keys topk isinstance size t eq mul_ expand_as append sum max cosine_distance euclidean_squared_distance t addmm_ expand t normalize mm cumsum list defaultdict shape append sum range format asarray astype choice mean enumerate invert items print float32 argsort int32 zeros len invert format asarray print cumsum astype float32 argsort shape mean int32 append sum range update list group load_url match load_state_dict keys compile state_dict init_pretrained_weights DenseNet init_pretrained_weights DenseNet init_pretrained_weights DenseNet init_pretrained_weights DenseNet init_pretrained_weights DenseNet InceptionResNetV2 load_imagenet_weights init_pretrained_weights InceptionV4 MLFN format warn format warn MobileNetV2 format warn MobileNetV2 NASNetAMobile init_pretrained_weights load join items format print warn _get_torch_home OrderedDict startswith append download makedirs OSNet init_pretrained_weights OSNet init_pretrained_weights OSNet init_pretrained_weights OSNet init_pretrained_weights OSNet init_pretrained_weights PCB init_pretrained_weights PCB init_pretrained_weights ResNet init_pretrained_weights ResNet init_pretrained_weights ResNet init_pretrained_weights ResNet init_pretrained_weights ResNet init_pretrained_weights ResNet init_pretrained_weights ResNet init_pretrained_weights ResNet init_pretrained_weights ResNetMid init_pretrained_weights init_pretrained_weights SENet init_pretrained_weights SENet init_pretrained_weights SENet init_pretrained_weights SENet init_pretrained_weights SENet init_pretrained_weights SENet init_pretrained_weights SENet format ShuffleNet warn size view contiguous ShuffleNetV2 init_pretrained_weights ShuffleNetV2 init_pretrained_weights ShuffleNetV2 init_pretrained_weights ShuffleNetV2 init_pretrained_weights SqueezeNet init_pretrained_weights SqueezeNet init_pretrained_weights SqueezeNet init_pretrained_weights init_pretrained_weights Xception print list keys list keys CosineAnnealingLR StepLR isinstance MultiStepLR float named_children isinstance Adam warn RMSprop SGD parameters DataParallel append module groups numel in_channels item kernel_size numel kernel_size numel _pair item _triple kernel_size numel item kernel_size numel kernel_size numel _pair item _triple kernel_size numel item ceil size numel output_size list output_size numel item Tensor _pair list output_size numel _triple item Tensor ceil size numel output_size list output_size numel item Tensor _pair list output_size numel _triple item Tensor numel numel affine numel elementwise_affine numel in_features numel int remove defaultdict flops format namedtuple model print rand training apply params append train sum cuda is_cuda join BORDER_CONSTANT format basename imwrite copyMakeBorder _cp_img_to print ones argsort shape resize imread range mkdir_if_missing minimum exp zeros_like concatenate transpose astype float32 mean int32 unique append zeros sum max range len makedirs format warn isfile dirname mkdir_if_missing seed manual_seed_all manual_seed print format write urlretrieve convert get_pretty_env_info items list join str format print copy OrderedDict dirname startswith save mkdir_if_missing load print load_checkpoint format load_state_dict param_groups eval __name__ parameters train named_children isinstance parameters eval DataParallel train module isinstance warn DataParallel sum module update items list format print load_checkpoint warn OrderedDict load_state_dict startswith append state_dict
donnjonn/Masterproef
1,943
donnyyou/pytorch-lffd
['face detection']
['LFFD: A Light and Fast Face Detector for Edge Devices']
ChasingTrainFramework_GeneralOneClassDetection/loss_layer_farm/cross_entropy_with_focal_loss_for_one_class_detection.py head_detection/accuracy_evaluation/evaluation_on_brainwash.py pedestrian_detection/symbol_farm/symbol_30_320_20L_4scales_v1.py ChasingTrainFramework_GeneralOneClassDetection/image_augmentation/augmentor.py face_detection/config_farm/configuration_10_560_25L_8scales_v1.py face_detection/symbol_farm/symbol_10_560_25L_8scales_v1.py face_detection/data_provider_farm/text_list_adapter.py head_detection/data_provider_farm/text_list_adapter.py head_detection/data_iterator_farm/multithread_dataiter_for_cross_entropy_v1.py pedestrian_detection/config_farm/configuration_30_320_20L_4scales_v1.py ChasingTrainFramework_GeneralOneClassDetection/loss_layer_farm/cross_entropy_with_hnm_for_one_class_detection.py head_detection/config_farm/configuration_10_160_17L_4scales_v1.py face_detection/inference_speed_evaluation/inference_speed_eval.py head_detection/inference_speed_evaluation/inference_speed_eval.py pedestrian_detection/metric_farm/metric_default.py face_detection/accuracy_evaluation/predict.py head_detection/symbol_farm/symbol_10_160_17L_4scales_v1.py ChasingTrainFramework_GeneralOneClassDetection/data_provider_base/base_provider.py ChasingTrainFramework_GeneralOneClassDetection/data_provider_base/base_data_adapter.py ChasingTrainFramework_GeneralOneClassDetection/logging_GOCD.py face_detection/deploy_tensorrt/predict_tensorrt.py pedestrian_detection/data_provider_farm/pickle_provider.py face_detection/symbol_farm/symbol_10_320_20L_5scales_v2.py head_detection/data_provider_farm/reformat_brainwash.py pedestrian_detection/data_iterator_farm/multithread_dataiter_for_cross_entropy_v1.py ChasingTrainFramework_GeneralOneClassDetection/data_iterator_base/data_batch.py face_detection/data_iterator_farm/multithread_dataiter_for_cross_entropy_v1.py ChasingTrainFramework_GeneralOneClassDetection/data_provider_base/text_list_adapter.py face_detection/data_iterator_farm/multithread_dataiter_for_cross_entropy_v2.py ChasingTrainFramework_GeneralOneClassDetection/data_provider_base/pickle_provider.py pedestrian_detection/accuracy_evaluation/predict.py ChasingTrainFramework_GeneralOneClassDetection/inference_speed_eval/inference_speed_eval_with_tensorrt_cudnn.py ChasingTrainFramework_GeneralOneClassDetection/train_GOCD.py face_detection/config_farm/__init__.py face_detection/demo/demo.py ChasingTrainFramework_GeneralOneClassDetection/loss_layer_farm/mean_squared_error_with_hnm_for_one_class_detection.py face_detection/symbol_farm/__init__.py head_detection/data_provider_farm/pickle_provider.py head_detection/metric_farm/metric_default.py face_detection/metric_farm/metric_default.py face_detection/accuracy_evaluation/evaluation_on_fddb.py ChasingTrainFramework_GeneralOneClassDetection/solver_GOCD.py pedestrian_detection/data_provider_farm/text_list_adapter.py pedestrian_detection/inference_speed_evaluation/inference_speed_eval.py ChasingTrainFramework_GeneralOneClassDetection/loss_layer_farm/mean_squared_error_with_ohem_for_one_class_detection.py face_detection/data_provider_farm/pickle_provider.py ChasingTrainFramework_GeneralOneClassDetection/inference_speed_eval/inference_speed_eval_with_mxnet_cudnn.py head_detection/accuracy_evaluation/predict.py pedestrian_detection/data_provider_farm/reformat_caltech.py face_detection/config_farm/configuration_10_320_20L_5scales_v2.py face_detection/deploy_tensorrt/to_onnx.py face_detection/accuracy_evaluation/evaluation_on_widerface.py temp_test init_logging Solver start_train DataBatch DataAdapterBaseclass ProviderBaseclass read_file write_file PickleProvider TextListAdapter Augmentor InferenceSpeedEval InferenceSpeedEval HostDeviceMem focal_loss_for_twoclass focal_loss_for_twoclass_Prop cross_entropy_with_hnm_for_one_class_detection_Prop cross_entropy_with_hnm_for_one_class_detection mean_squared_error_with_hnm_for_one_class_detection mean_squared_error_with_hnm_for_one_class_detection_Prop mean_squared_error_with_ohem_for_one_class_detection_Prop mean_squared_error_with_ohem_for_one_class_detection DataBatch run_prediction_folder Predict NMS run run Multithread_DataIter_for_CrossEntropy Multithread_DataIter_for_CrossEntropy read_file write_file PickleProvider TextListAdapter main parse_args run_prediction_folder Inference_TensorRT HostDeviceMem NMS generate_onnx_file Metric run_get_net_symbol_for_train loss_branch get_net_symbol run_get_net_symbol_for_train loss_branch get_net_symbol generate_gt_files generate_predicted_files DataBatch Predict run_prediction_pickle NMS run Multithread_DataIter_for_CrossEntropy read_file write_file PickleProvider dataset_statistics generate_data_list show_image TextListAdapter Metric run_get_net_symbol_for_train loss_branch get_net_symbol Predict run_prediction_pickle DataBatch NMS run_prediction_folder run Multithread_DataIter_for_CrossEntropy read_file write_file PickleProvider dataset_statistics generate_data_list show_image TextListAdapter Metric run_get_net_symbol_for_train loss_branch get_net_symbol setFormatter addHandler print makedirs exit StreamHandler Formatter dirname setLevel FileHandler init_logging str list items __version__ info Solver fit write PickleProvider TextListAdapter PickleProvider ndarray isinstance print read_by_index positive_index shuffle waitKey imshow rectangle negative_index range enumerate minimum concatenate astype float32 maximum delete argsort append len join Predict waitKey imshow rectangle resize append imread max predict PickleProvider start_train get_net_symbol Xavier DataIter Metric init_logging info append add_argument ArgumentParser data VideoCapture imwrite FONT_HERSHEY_SIMPLEX VideoWriter VideoWriter_fourcc release destroyAllWindows waitKey shape imshow parse_args imread predict use_gpu replace astype join read Predict time uint8 print putText write rectangle cpu gpu do_inference Inference_TensorRT load update basicConfig list items load_model graph export_model float32 dict check_graph split Convolution Custom slice_axis softmax LinearRegressionOutput Activation Variable Convolution Group loss_branch Activation list_outputs list_arguments print get_net_symbol list_auxiliary_states infer_shape print_summary int join str replace print strip makedirs write close split findall float append open join Predict replace print strip makedirs write close IMREAD_COLOR imread predict open Predict PickleProvider print read_by_index positive_index waitKey imshow rectangle negative_index predict join int str print strip makedirs len write close dirname split findall float append open int readlines close shuffle waitKey imshow rectangle open imread range append split int sorted print readlines close min open max range split str imwrite shuffle floor ceil walk enumerate
# A Light and Fast Face Detector for Edge Devices **This repo is updated frequently, keeping up with the latest code is highly recommended.** ## Recent Update * `2019.07.25` This repos is first online. Face detection code and trained models are released. * `2019.08.15` This repos is formally released. Any advice and error reports are sincerely welcome. * `2019.08.22` face_detection: latency evaluation on TX2 is added. * `2019.08.25` face_detection: RetinaFace-MobileNet-0.25 is added for comparison (both accuracy and latency). * `2019.09.09` LFFD is ported to NCNN ([link](https://github.com/SyGoing/LFFD-with-ncnn)) and MNN ([link](https://github.com/SyGoing/LFFD-MNN)) by [SyGoing](https://github.com/SyGoing), great thanks to SyGoing. * `2019.09.10` face_detection: **important bug fix:** vibration offset should be subtracted by shift in data iterator. This bug may result in lower accuracy, inaccurate bbox prediction and bbox vibration in test phase. We will upgrade v1 and v2 as soon as possible (should have higher accuracy and more stable).
1,944
dontLoveBugs/DORN_pytorch
['depth estimation', 'monocular depth estimation']
['Deep Ordinal Regression Network for Monocular Depth Estimation']
dorn/modules/decoders/__init__.py dorn/modules/losses/__init__.py dorn/modules/__init__.py dorn/modules/decoders/OrdinalRegression.py dorn/modules/losses/ordinal_regression_loss.py dorn/__init__.py dorn/modules/layers/__init__.py dorn/modules/encoders/SceneUnderstandingModule.py dorn/modules/layers/basic_layers.py dorn/models/__init__.py dorn/models/dorn.py dorn/modules/encoders/__init__.py dorn/modules/backbones/resnet.py dorn/modules/backbones/__init__.py DepthPredModel _get_model ResNet conv3x3 Bottleneck ResNetBackbone OrdinalRegressionLayer SceneUnderstandingModule FullImageEncoder conv_bn_relu consistent_padding_with_dilation OrdinalRegressionLoss format __import__ list tuple _triple range _pair consistent_padding_with_dilation
# DORN ### Update The entire codebase has been updated, and some layers and loss functions have been reimplemented to make it running fast and using less memory. This respository only contains the core code of DORN model. The whole code will be saved in [SupervisedDepthPrediction](https://github.com/dontLoveBugs/SupervisedDepthPrediction). ### Introduction This is a PyTorch implementation of [Deep Ordinal Regression Network for Monocular Depth Estimation](http://arxiv.org/abs/1806.02446). ### Pretrained Model The resnet backbone of DORN, which has three conv in first conv layer, is different from original resnet. The pretrained model of the resnet backbone can download from [MIT imagenet pretrained resnet101](http://sceneparsing.csail.mit.edu/model/pretrained_resnet/resnet101-imagenet.pth). ### Datasets #### NYU Depth V2 Not Implemented.
1,945
donydchen/FMPN-FER
['facial expression recognition']
['Facial Motion Prior Networks for Facial Expression Recognition']
solvers/res_solver.py data/__init__.py visualizer.py data/affectnet.py solvers/__init__.py model/base_model.py model/res_baseline.py model/res_cls.py data/ckplus_res.py data/base_dataset.py options.py solvers/res_cls_solver.py model/__init__.py solvers/base_solver.py data/mmi_res.py main.py data/data_loader.py model/model_utils.py Options Visualizer AffectNetDataset BaseDataset CKPlusResDataset DataLoader create_dataloader MMIResDataset BaseModel get_norm_layer PseudoNorm define_FusionNet ResnetBlock define_ClassifierNet custom_inception_v3 FusionNet init_weights ResFaceGenNet get_scheduler define_ResFaceGenNet init_net get_optimizer ResGenModel ResClsModel create_model BaseSolver ResFaceClsSolver ResFaceSolver create_solver DataLoader initialize BatchNorm2d partial InstanceNorm2d LambdaLR ReduceLROnPlateau StepLR Adam RMSprop SGD print apply init_weights to DataParallel data print load_url load_state_dict xavier_normal_ Inception3 constant_ Linear get_norm_layer print resnet50 custom_inception_v3 resnet152 densenet121 print ResFaceGenNet get_norm_layer FusionNet initialize ResGenModel setup BaseModel ResClsModel BaseSolver initialize ResFaceClsSolver ResFaceSolver
# FMPN-FER <p align="left"> <img src="https://img.shields.io/badge/Status-Release-gold.svg?style=flat-square" alt="Status"> <img src="https://img.shields.io/badge/Platform-Linux-lightgrey.svg?style=flat-square" alt="Platform"> <img src="https://img.shields.io/badge/PyTorch Version-0.4.1-blue.svg?style=flat-square" alt="PyTorch"> <img src="https://img.shields.io/badge/License-MIT-green.svg?style=flat-square" alt="License"> </p> [![PWC](https://img.shields.io/endpoint.svg?style=flat-square&url=https://paperswithcode.com/badge/facial-motion-prior-networks-for-facial/facial-expression-recognition-on-mmi)](https://paperswithcode.com/sota/facial-expression-recognition-on-mmi?p=facial-motion-prior-networks-for-facial) [![PWC](https://img.shields.io/endpoint.svg?style=flat-square&url=https://paperswithcode.com/badge/facial-motion-prior-networks-for-facial/facial-expression-recognition-on-ck)](https://paperswithcode.com/sota/facial-expression-recognition-on-ck?p=facial-motion-prior-networks-for-facial) Official PyTorch Implementation of **Facial Motion Prior Networks for Facial Expression Recognition** by <a href="https://donydchen.github.io">Yuedong Chen</a>, <a href="https://jianfeng1991.github.io/personal">Jianfeng Wang, <a href="https://www.researchgate.net/profile/Shikai_Chen3">Shikai Chen</a>, Zhongchao Shi, and <a href="https://www.ntu.edu.sg/home/asjfcai/">Jianfei Cai</a>.
1,946
dorian-v/simple_neural_style_transfer
['style transfer']
['A Neural Algorithm of Artistic Style']
run.py vgg_model.py config.py get_directory.py image_tools.py CONFIG get_directory generate_noise_image save_image reshape_and_normalize_image compute_style_cost compute_total_variation_regularization define_total_cost_function model_nn compute_content_cost gram_matrix get_content_image_activations get_style_image_activations compute_layer_style_cost total_cost load_vgg_model reshape astype reshape shape MEANS resize array MEANS imwrite astype assign run as_list reshape transpose subtract square reduce_sum transpose matmul assign run as_list reshape transpose subtract square reduce_sum gram_matrix compute_content_cost compute_style_cost compute_total_variation_regularization total_cost str assign get_directory global_variables_initializer save_image range run _conv2d_relu Variable zeros _avgpool loadmat
# Neural Style Transfer TensorFlow implementation of "A Neural Algorithm of Artistic Style" by Leon A. Gatys, Alexander S. Ecker, Matthias Bethge (https://arxiv.org/abs/1508.06576). Based on Course 4 Week 4 practical exercise of deeplearning.ai's Deep Learning Specialization on Coursera. Using a pre-trained convolutional neural network, we combine the content of an image and the style of another to generate a new image. ## Dependencies ``` pip install -r requirements.txt
1,947
dotcli/zombie-architect
['unity']
['Unity: A General Platform for Intelligent Agents']
ml-agents/mlagents/trainers/components/reward_signals/curiosity/model.py ml-agents-envs/mlagents_envs/communicator_objects/command_pb2.py ml-agents/mlagents/trainers/run_experiment.py ml-agents-envs/mlagents_envs/mock_communicator.py ml-agents/mlagents/trainers/policy/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/unity_to_external_pb2.py ml-agents-envs/mlagents_envs/communicator.py gym-unity/gym_unity/envs/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/brain_parameters_pb2.py ml-agents/mlagents/trainers/learn.py ml-agents/mlagents/trainers/tests/test_sampler_class.py ml-agents/mlagents/logging_util.py ml-agents/mlagents/trainers/meta_curriculum.py ml-agents/mlagents/trainers/tests/test_barracuda_converter.py ml-agents-envs/mlagents_envs/side_channel/raw_bytes_channel.py ml-agents/mlagents/trainers/trainer/trainer.py gym-unity/gym_unity/__init__.py ml-agents-envs/mlagents_envs/side_channel/__init__.py utils/validate_meta_files.py ml-agents/mlagents/trainers/trainer_controller.py ml-agents/mlagents/trainers/components/bc/model.py ml-agents/mlagents/trainers/tests/test_curriculum.py ml-agents/mlagents/trainers/action_info.py ml-agents/mlagents/trainers/tests/test_ppo.py ml-agents/mlagents/tf_utils/__init__.py ml-agents/mlagents/trainers/components/reward_signals/__init__.py ml-agents-envs/setup.py ml-agents-envs/mlagents_envs/side_channel/engine_configuration_channel.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_output_pb2.py ml-agents/mlagents/trainers/tests/mock_brain.py ml-agents/mlagents/trainers/tests/test_bcmodule.py ml-agents/mlagents/trainers/tests/test_trainer_controller.py ml-agents-envs/mlagents_envs/side_channel/incoming_message.py ml-agents/mlagents/trainers/components/reward_signals/reward_signal_factory.py ml-agents-envs/mlagents_envs/rpc_utils.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_initialization_output_pb2.py ml-agents/setup.py ml-agents/mlagents/trainers/barracuda.py ml-agents/mlagents/trainers/optimizer/tf_optimizer.py ml-agents/mlagents/trainers/env_manager.py ml-agents/mlagents/trainers/ppo/trainer.py ml-agents/mlagents/trainers/policy/policy.py ml-agents-envs/mlagents_envs/communicator_objects/agent_action_pb2.py ml-agents/mlagents/model_serialization.py ml-agents-envs/mlagents_envs/tests/test_rpc_communicator.py ml-agents-envs/mlagents_envs/tests/test_envs.py ml-agents/mlagents/trainers/brain.py utils/validate_inits.py ml-agents-envs/mlagents_envs/side_channel/float_properties_channel.py ml-agents/mlagents/trainers/tests/test_meta_curriculum.py ml-agents/mlagents/trainers/components/reward_signals/curiosity/signal.py ml-agents/mlagents/trainers/simple_env_manager.py ml-agents-envs/mlagents_envs/side_channel/outgoing_message.py ml-agents-envs/mlagents_envs/exception.py ml-agents/mlagents/trainers/curriculum.py ml-agents/mlagents/trainers/tests/test_policy.py ml-agents/mlagents/trainers/trainer/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/unity_message_pb2.py ml-agents/mlagents/trainers/tests/test_learn.py ml-agents/mlagents/trainers/policy/nn_policy.py ml-agents-envs/mlagents_envs/communicator_objects/agent_info_pb2.py ml-agents/mlagents/trainers/tests/test_demo_loader.py ml-agents-envs/mlagents_envs/communicator_objects/observation_pb2.py utils/validate_versions.py ml-agents-envs/mlagents_envs/tests/test_rpc_utils.py ml-agents/mlagents/trainers/models.py ml-agents-envs/mlagents_envs/tests/test_timers.py ml-agents/mlagents/trainers/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/custom_reset_parameters_pb2.py ml-agents-envs/mlagents_envs/communicator_objects/agent_info_action_pair_pb2.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_input_pb2.py ml-agents/mlagents/trainers/tests/test_nn_policy.py ml-agents-envs/mlagents_envs/timers.py ml-agents/mlagents/trainers/tests/test_simple_rl.py ml-agents/mlagents/trainers/exception.py ml-agents/mlagents/trainers/tests/test_distributions.py gym-unity/gym_unity/tests/test_gym.py utils/make_readme_table.py ml-agents/mlagents/tf_utils/tf.py ml-agents/mlagents/trainers/tests/test_ghost.py ml-agents/mlagents/trainers/buffer.py ml-agents-envs/mlagents_envs/side_channel/side_channel.py ml-agents/mlagents/trainers/tests/test_subprocess_env_manager.py ml-agents/mlagents/trainers/subprocess_env_manager.py ml-agents/mlagents/trainers/tensorflow_to_barracuda.py ml-agents/mlagents/trainers/agent_processor.py ml-agents-envs/mlagents_envs/communicator_objects/engine_configuration_pb2.py ml-agents/mlagents/trainers/tests/test_rl_trainer.py ml-agents-envs/mlagents_envs/rpc_communicator.py ml-agents-envs/mlagents_envs/communicator_objects/demonstration_meta_pb2.py ml-agents-envs/mlagents_envs/__init__.py gym-unity/setup.py ml-agents/mlagents/trainers/behavior_id_utils.py ml-agents/mlagents/trainers/sac/network.py ml-agents/mlagents/trainers/distributions.py ml-agents/mlagents/trainers/policy/tf_policy.py ml-agents/mlagents/trainers/optimizer/__init__.py ml-agents/mlagents/trainers/tests/simple_test_envs.py ml-agents/mlagents/trainers/tests/__init__.py ml-agents-envs/mlagents_envs/communicator_objects/unity_output_pb2.py ml-agents-envs/mlagents_envs/communicator_objects/space_type_pb2.py ml-agents/mlagents/trainers/trainer_util.py ml-agents/mlagents/trainers/tests/test_trainer_util.py ml-agents/mlagents/trainers/components/reward_signals/extrinsic/signal.py ml-agents/mlagents/trainers/sac/trainer.py ml-agents/mlagents/trainers/sampler_class.py ml-agents/tests/yamato/training_int_tests.py ml-agents/mlagents/trainers/tests/test_sac.py ml-agents/mlagents/trainers/trajectory.py ml-agents/mlagents/trainers/ppo/optimizer.py ml-agents-envs/mlagents_envs/communicator_objects/unity_rl_initialization_input_pb2.py ml-agents-envs/mlagents_envs/base_env.py ml-agents-envs/mlagents_envs/communicator_objects/header_pb2.py ml-agents/mlagents/trainers/tests/test_stats.py ml-agents/mlagents/trainers/components/reward_signals/gail/model.py ml-agents/mlagents/trainers/tests/test_reward_signals.py ml-agents/mlagents/trainers/components/reward_signals/gail/signal.py ml-agents-envs/mlagents_envs/tests/test_side_channel.py ml-agents/mlagents/trainers/sac/optimizer.py ml-agents/tests/yamato/standalone_build_tests.py ml-agents-envs/mlagents_envs/environment.py ml-agents/mlagents/trainers/demo_loader.py ml-agents/mlagents/trainers/ghost/trainer.py ml-agents/tests/yamato/editmode_tests.py ml-agents/mlagents/trainers/components/bc/module.py ml-agents-envs/mlagents_envs/communicator_objects/unity_input_pb2.py ml-agents/mlagents/trainers/tests/test_buffer.py ml-agents/mlagents/trainers/trainer/rl_trainer.py ml-agents/mlagents/trainers/tests/test_agent_processor.py ml-agents-envs/mlagents_envs/communicator_objects/unity_to_external_pb2_grpc.py ml-agents/mlagents/trainers/brain_conversion_utils.py ml-agents/tests/yamato/yamato_utils.py ml-agents/mlagents/trainers/stats.py ml-agents/mlagents/trainers/tests/test_trajectory.py ml-agents/mlagents/trainers/optimizer/optimizer.py VerifyVersionCommand AgentIdIndexMapper AgentIdIndexMapperSlow ActionFlattener UnityEnv UnityGymException test_sanitize_action_shuffled_id test_sanitize_action_one_agent_done test_gym_wrapper test_multi_agent test_agent_id_index_mapper create_mock_group_spec test_branched_flatten setup_mock_unityenvironment test_gym_wrapper_visual create_mock_vector_step_result VerifyVersionCommand create_logger _get_frozen_graph_node_names export_policy_model _make_onnx_node_for_constant _make_frozen_graph _get_output_node_names _get_input_node_names convert_frozen_to_onnx _enforce_onnx_conversion SerializationSettings _process_graph set_warnings_enabled generate_session_config ActionInfo AgentManager AgentProcessor AgentManagerQueue BarracudaWriter fuse print_known_operations compress Build sort lstm write fuse_batchnorm_weights trim mean gru Model summary Struct parse_args to_json rnn BehaviorIdentifiers BrainParameters CameraResolution group_spec_to_brain_parameters get_global_agent_id BufferException AgentBuffer Curriculum make_demo_buffer load_demonstration demo_to_buffer get_demo_files OutputDistribution DiscreteOutputDistribution MultiCategoricalDistribution GaussianDistribution EnvManager EnvironmentStep SamplerException TrainerConfigError CurriculumError TrainerError MetaCurriculumError CurriculumLoadingError UnityTrainerException CurriculumConfigError RunOptions write_timing_tree create_sampler_manager create_environment_factory parse_command_line run_training prepare_for_docker_run try_create_meta_curriculum run_cli main _create_parser get_version_string MetaCurriculum EncoderType NormalizerTensors ModelUtils LearningRateSchedule main parse_command_line MultiRangeUniformSampler UniformSampler SamplerFactory SamplerManager GaussianSampler Sampler SimpleEnvManager StatsWriter StatsSummary StatsReporter GaugeWriter TensorboardWriter CSVWriter worker EnvironmentResponse UnityEnvWorker StepResponse SubprocessEnvManager EnvironmentCommand get_layer_shape pool_to_HW flatten sqr_diff process_layer process_model get_layer_rank slow_but_stable_topological_sort get_attr basic_lstm ModelBuilderContext order_by get_epsilon get_tensor_dtype replace_strings_in_list debug embody by_op get_tensor_dims strided_slice remove_duplicates_from_list axis_to_barracuda by_name locate_actual_output_node convert strides_to_HW get_tensor_data very_slow_but_stable_topological_sort gru TrainerController TrainerFactory initialize_trainer load_config _load_config AgentExperience Trajectory SplitObservations BCModel BCModule create_reward_signal RewardSignal CuriosityModel CuriosityRewardSignal ExtrinsicRewardSignal GAILModel GAILRewardSignal compute_elo_rating_changes GhostTrainer Optimizer TFOptimizer NNPolicy Policy TFPolicy UnityPolicyException PPOOptimizer PPOTrainer get_gae discount_rewards SACPolicyNetwork SACTargetNetwork SACNetwork SACOptimizer SACTrainer create_mock_pushblock_brain create_mock_batchedstep simulate_rollout make_brain_parameters setup_mock_brain make_fake_trajectory create_mock_banana_brain create_batchedstep_from_brainparams create_mock_brainparams create_mock_3dball_brain clamp Memory1DEnvironment Simple1DEnvironment test_end_episode test_agent_deletion test_agent_manager_queue test_agentprocessor test_agent_manager create_mock_brain create_mock_policy test_barracuda_converter test_policy_conversion dummy_config test_bcmodule_rnn_update test_bcmodule_update test_bcmodule_constant_lr_update ppo_dummy_config test_bcmodule_dc_visual_update create_bc_module test_bcmodule_defaults test_bcmodule_rnn_dc_update test_buffer_sample construct_fake_buffer test_num_experiences assert_array fakerandint test_buffer test_buffer_truncate test_curriculum_load_invalid_json default_reset_parameters test_load_bad_curriculum_file_raises_error test_curriculum_load_missing_file test_get_parameters test_init_curriculum_happy_path test_increment_lesson test_curriculum_load_good test_edge_cases test_load_demo test_load_demo_dir test_multicategorical_distribution test_tanh_distribution dummy_config test_gaussian_distribution test_load_and_set dummy_config test_publish_queue test_process_trajectory basic_options test_docker_target_path test_run_training test_bad_env_path test_commandline_args test_env_args test_increment_lessons_with_reward_buff_sizes test_increment_lessons measure_vals reward_buff_sizes test_set_all_curriculums_to_lesson_num test_get_config test_set_lesson_nums test_simple_metacurriculum test_curriculum_config test_min_visual_size create_policy_mock test_normalization dummy_config test_policy_evaluate basic_mock_brain test_take_action_returns_action_info_when_available basic_params test_take_action_returns_nones_on_missing_values test_take_action_returns_empty_with_no_agents FakePolicy test_trainer_increment_step test_trainer_update_policy test_ppo_optimizer_update test_ppo_optimizer_update_curiosity test_process_trajectory test_rl_functions test_add_get_policy test_bad_config _create_fake_trajectory _create_ppo_optimizer_ops_mock dummy_config test_ppo_optimizer_update_gail test_ppo_get_value_estimates test_gail_dc_visual sac_dummy_config reward_signal_update reward_signal_eval test_extrinsic test_curiosity_cc test_gail_rnn test_gail_cc ppo_dummy_config test_curiosity_dc curiosity_dummy_config test_curiosity_visual test_curiosity_rnn create_optimizer_mock gail_dummy_config FakeTrainer create_rl_trainer dummy_config test_rl_trainer create_mock_brain test_advance test_clear_update_buffer test_sac_update_reward_signals test_add_get_policy test_bad_config create_sac_optimizer_mock test_sac_optimizer_update dummy_config test_process_trajectory test_sac_save_load_buffer test_empty_samplers sampler_config_1 check_value_in_intervals incorrect_uniform_sampler test_incorrect_sampler test_sampler_config_1 sampler_config_2 incorrect_sampler_config test_incorrect_uniform_sampler test_sampler_config_2 test_recurrent_sac test_visual_sac generate_config test_simple_sac default_reward_processor test_simple_ghost test_visual_advanced_ppo test_simple_ppo test_simple_ghost_fails test_visual_ppo test_recurrent_ppo DebugWriter test_visual_advanced_sac _check_environment_trains test_tensorboard_writer test_stat_reporter_add_summary_write test_gauge_stat_writer_sanitize test_stat_reporter_text test_csv_writer MockEnvWorker mock_env_factory SubprocessEnvManagerTest create_worker_mock test_subprocess_env_endtoend simple_env_factory test_initialization_seed test_start_learning_trains_until_max_steps_then_saves basic_trainer_controller trainer_controller_with_take_step_mocks test_advance_adds_experiences_to_trainer_and_trains trainer_controller_with_start_learning_mocks test_start_learning_trains_forever_if_no_train_model test_initialize_ppo_trainer test_handles_no_default_section test_load_config_invalid_yaml test_initialize_invalid_trainer_raises_exception dummy_bad_config dummy_config test_load_config_missing_file test_load_config_valid_yaml test_initialize_trainer_parameters_override_defaults test_raise_if_no_config_for_brain dummy_config_with_override test_trajectory_to_agentbuffer test_split_obs np_zeros_no_float64 np_array_no_float64 _check_no_float64 np_ones_no_float64 RLTrainer Trainer main clean_previous_results TestResults parse_results main main override_config_file init_venv get_unity_executable_path get_base_path run_standalone_build VerifyVersionCommand StepResult ActionType AgentGroupSpec BatchedStepResult BaseEnv Communicator UnityEnvironment UnityObservationException UnityWorkerInUseException UnityException UnityCommunicationException UnityTimeOutException UnitySideChannelException UnityEnvironmentException UnityActionException MockCommunicator RpcCommunicator UnityToExternalServicerImplementation agent_group_spec_from_proto _generate_split_indices process_pixels _raise_on_nan_and_inf observation_to_np_array batched_step_result_from_proto _process_vector_observation _process_visual_observation TimerNode hierarchical_timer get_timer_root get_timer_tree reset_timers set_gauge timed GaugeNode TimerStack UnityToExternalProtoServicer add_UnityToExternalProtoServicer_to_server UnityToExternalProtoStub EngineConfigurationChannel EngineConfig FloatPropertiesChannel IncomingMessage OutgoingMessage RawBytesChannel SideChannel test_initialization test_reset test_returncode_to_signal_name test_close test_step test_handles_bad_filename test_rpc_communicator_checks_port_on_create test_rpc_communicator_create_multiple_workers test_rpc_communicator_close test_batched_step_result_from_proto generate_compressed_proto_obs test_agent_group_spec_from_proto test_batched_step_result_from_proto_raises_on_nan test_vector_observation test_action_masking_continuous test_process_visual_observation test_action_masking_discrete_1 test_process_pixels test_process_visual_observation_bad_shape test_action_masking_discrete test_action_masking_discrete_2 generate_compressed_data test_process_pixels_gray generate_list_agent_proto generate_uncompressed_proto_obs test_batched_step_result_from_proto_raises_on_infinite test_raw_bytes test_int_channel test_message_float_list IntChannel test_message_bool test_message_string test_float_properties test_message_int32 test_message_float32 test_timers decorated_func table_line validate_packages main NonTrivialPEP420PackageFinder main set_academy_version_string extract_version_string set_package_version check_versions set_version sample UnityEnv create_mock_group_spec create_mock_vector_step_result setup_mock_unityenvironment step UnityEnv create_mock_group_spec create_mock_vector_step_result setup_mock_unityenvironment step setup_mock_unityenvironment UnityEnv create_mock_group_spec create_mock_vector_step_result sample UnityEnv create_mock_group_spec create_mock_vector_step_result setup_mock_unityenvironment step _sanitize_info list zip agent_id UnityEnv reward create_mock_group_spec create_mock_vector_step_result setup_mock_unityenvironment array range _sanitize_info list zip agent_id UnityEnv create_mock_group_spec create_mock_vector_step_result setup_mock_unityenvironment array range tuple CONTINUOUS range DISCRETE list array range get_id_permutation mark_agent_done set_initial_agents mapper_cls register_new_agent_id enumerate basicConfig getLogger convert_to_barracuda convert convert_to_onnx _make_frozen_graph _enforce_onnx_conversion convert_frozen_to_onnx info model_path items list tf_optimize make_model node _make_onnx_node_for_constant extend _get_output_node_names _get_input_node_names info append brain_name optimize_graph TensorProto _get_frozen_graph_node_names add _get_frozen_graph_node_names name add node set brain_name info set_verbosity ConfigProto join isdir print replaceFilenameExtension add_argument exit verbose source_file ArgumentParser target_file sqrt topologicalSort list hasattr layers addEdge Graph print inputs set len list hasattr layers print filter match trim_model compile data layers print tensors float16 replace layers dumps layers isinstance print tensors inputs zip to_json globals Build array_equal pool reduce Build tanh mad tanh mul Build concat add sigmoid sub mad _ tanh mul Build concat add sigmoid mad print sorted keys is_action_discrete sum get_agent_step_result resequence_and_append done obs from_observations reward batched_step_result_from_proto vector_actions AgentBuffer append reset_agent vector_observations array visual_observations enumerate make_demo_buffer load_demonstration group_spec_to_brain_parameters isdir isfile get_demo_files add_argument_group add_argument ArgumentParser parse_args start_learning pop SamplerManager MetaCurriculum set_all_curricula_to_lesson_num chmod format basename isdir glob copyfile copytree validate_environment_path prepare_for_docker_run seed _asdict print debug run_training dumps randint create_logger set_warnings_enabled cpu DEBUG INFO get_version_string parse_command_line run_cli add_argument ArgumentParser RunOptions experiment_config_path load_config FloatPropertiesChannel get_property_dict_copy get_timer_root reset_timers put _send_response StepResponse list _generate_all_results set_actions set_property action set_configuration EngineConfigurationChannel external_brains payload items EnvironmentResponse reset step endswith len print HasField hasattr get_attr isinstance get_attr tensor_shape ndarray isinstance shape int_val bool_val float_val ListFields name ndarray isinstance str tensor_content ndarray product isinstance get_tensor_dtype print get_tensor_dims unpack int_val bool_val array float_val enter append add set Build mul sub insert Build tolist append range len locate_actual_output_node name find_tensor_by_name split locate_actual_output_node name lstm find_tensor_by_name find_forget_bias split get_layer_shape id Struct tensor get_layer_rank layer_ranks hasattr name patch_data rank input_shapes out_shapes input get_attr append replace_strings_in_list tensors embody astype op inputs zip enumerate print float32 patch_data_fn model_tensors map_ignored_layer_to_its_input co_argcount len items list hasattr get_tensors name print process_layer eval slow_but_stable_topological_sort ModelBuilderContext sort assign_ids pop range insert len layers verbose Struct process_model open print_known_operations fuse compress node GraphDef Model dims_to_barracuda_shape insert get_tensor_dims inputs MessageToJson ParseFromString cleanup_layers read memories print sort write trim summary print_supported_ops update str min_lesson_length format SACTrainer GhostTrainer copy warning PPOTrainer get check_config rcls pow list zeros_like size reversed range append discount_rewards Mock CameraResolution arange ones append array range ones AgentExperience append zeros sum range len vector_action_space_size pop number_visual_observations to_agentbuffer make_fake_trajectory vector_observation_space_size create_mock_brainparams create_mock_brainparams create_mock_brainparams create_mock_brainparams create_mock_brainparams zeros Mock Mock create_mock_batchedstep ActionInfo publish_trajectory_queue range AgentProcessor empty create_mock_policy add_experiences Mock create_mock_batchedstep assert_has_calls ActionInfo publish_trajectory_queue range call append AgentProcessor empty create_mock_policy add_experiences Mock create_mock_batchedstep assert_has_calls ActionInfo end_episode publish_trajectory_queue range call append AgentProcessor empty create_mock_policy add_experiences AgentManager create_mock_policy Mock get_nowait AgentManagerQueue put join remove _get_candidate_names convert _get_default_tempdir dirname abspath isfile next join str export_policy_model save_model sess graph create_policy_mock SerializationSettings model_path reset_default_graph brain_name initialize_or_load dirname abspath NNPolicy create_bc_module ppo_dummy_config create_mock_3dball_brain update items list ppo_dummy_config create_bc_module create_mock_3dball_brain update items list ppo_dummy_config current_lr create_bc_module create_mock_3dball_brain update items list ppo_dummy_config create_bc_module create_mock_3dball_brain update items list ppo_dummy_config create_mock_banana_brain create_bc_module update items list ppo_dummy_config create_mock_banana_brain create_bc_module flatten list range len append range AgentBuffer resequence_and_append get_batch construct_fake_buffer assert_array make_mini_batch AgentBuffer reset_agent array resequence_and_append sample_mini_batch construct_fake_buffer AgentBuffer resequence_and_append construct_fake_buffer AgentBuffer resequence_and_append list construct_fake_buffer AgentBuffer truncate values Curriculum Curriculum Curriculum dumps StringIO StringIO load_demonstration demo_to_buffer dirname abspath load_demonstration demo_to_buffer dirname abspath dirname abspath create_tf_graph brain_name setup_mock_brain load_weights init_load_weights zip assert_array_equal get_weights PPOTrainer create_policy GhostTrainer PPOTrainer subscribe_trajectory_queue advance put make_fake_trajectory BrainParameters AgentManagerQueue add_policy brain_name create_policy GhostTrainer PPOTrainer simulate_rollout get_nowait advance _swap_snapshots setup_mock_brain publish_policy_queue BrainParameters AgentManagerQueue add_policy brain_name create_policy MagicMock basic_options MagicMock parse_command_line parse_command_line MetaCurriculum increment_lessons Mock MetaCurriculum assert_called_with increment_lessons assert_not_called MetaCurriculum assert_called_with MetaCurriculum set_all_curricula_to_lesson_num MetaCurriculum Simple1DEnvironment safe_load loads MetaCurriculum _check_environment_trains setup_mock_brain NNPolicy list evaluate brain agent_id create_policy_mock create_batchedstep_from_brainparams reset_default_graph NNPolicy update_normalization to_agentbuffer make_fake_trajectory BrainParameters zeros range run MagicMock AgentGroupSpec basic_mock_brain basic_params get_action empty FakePolicy MagicMock basic_mock_brain BatchedStepResult basic_params get_action array FakePolicy MagicMock basic_mock_brain ActionInfo BatchedStepResult basic_params get_action array FakePolicy setup_mock_brain PPOOptimizer NNPolicy make_fake_trajectory update brain simulate_rollout _create_ppo_optimizer_ops_mock reset_default_graph update brain simulate_rollout _create_ppo_optimizer_ops_mock reset_default_graph update brain simulate_rollout _create_ppo_optimizer_ops_mock reset_default_graph items list get_trajectory_value_estimates to_agentbuffer _create_fake_trajectory _create_ppo_optimizer_ops_mock next_obs reset_default_graph assert_array_almost_equal array discount_rewards Mock brain_name _increment_step BrainParameters assert_called_with add_policy PPOTrainer _update_policy simulate_rollout brain_name setup_mock_brain add_policy PPOTrainer create_policy list values Mock brain_name make_brain_parameters add_policy PPOTrainer make_brain_parameters update NNPolicy setup_mock_brain PPOOptimizer SACOptimizer simulate_rollout evaluate_batch brain brain simulate_rollout prepare_update _execute_model update_dict make_mini_batch policy create_optimizer_mock reward_signal_eval reward_signal_update reward_signal_update reward_signal_eval dirname abspath create_optimizer_mock create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update create_optimizer_mock reward_signal_eval reward_signal_update FakeTrainer dummy_config create_mock_brain list create_rl_trainer end_episode episode_steps values items list construct_fake_buffer create_rl_trainer clear_update_buffer create_rl_trainer subscribe_trajectory_queue advance put make_fake_trajectory AgentManagerQueue range setup_mock_brain SACOptimizer NNPolicy update brain simulate_rollout create_sac_optimizer_mock reset_default_graph brain simulate_rollout create_sac_optimizer_mock update_reward_signals reset_default_graph str SACTrainer save_model brain simulate_rollout num_experiences setup_mock_brain add_policy brain_name create_policy SACTrainer SACTrainer make_brain_parameters SamplerManager sample_all sampler_config_1 sampler_config_2 SamplerManager SamplerManager sample_all incorrect_uniform_sampler incorrect_sampler_config update safe_load _check_environment_trains Simple1DEnvironment generate_config _check_environment_trains Simple1DEnvironment generate_config _check_environment_trains Simple1DEnvironment generate_config Memory1DEnvironment _check_environment_trains generate_config _check_environment_trains Simple1DEnvironment generate_config _check_environment_trains Simple1DEnvironment generate_config _check_environment_trains Simple1DEnvironment generate_config Memory1DEnvironment _check_environment_trains generate_config _check_environment_trains Simple1DEnvironment generate_config _check_environment_trains Simple1DEnvironment generate_config clear assert_called_once_with Mock get_stats_summaries add_stat add_writer StatsReporter float range write_stats clear Mock write_text add_writer StatsReporter assert_called_once_with Simple1DEnvironment generate_config close SubprocessEnvManager simple_env_factory _check_environment_trains default_config TrainerController assert_called_with MagicMock start_learning assert_called_once MagicMock assert_not_called start_learning assert_called_once MagicMock MagicMock assert_called_once MagicMock advance add assert_not_called BrainParametersMock BrainParametersMock TrainerFactory BrainParameters brain_name generate TrainerFactory BrainParameters _load_config StringIO append from_observations range ones items list to_agentbuffer add set make_fake_trajectory extract_stack filename get __old_np_array _check_no_float64 get _check_no_float64 __old_np_zeros get __old_np_ones _check_no_float64 join remove mkdir rmdir exists documentElement getAttribute parse join clean_previous_results parse_results get_unity_executable_path print exit returncode get_base_path copy2 run_standalone_build override_config_file init_venv exists run exists get_unity_executable_path print check_call update list values tuple vector_action_size mean reshape array data compressed_data reshape process_pixels shape array mean isnan array _raise_on_nan_and_inf sum is_action_discrete _generate_split_indices ones discrete_action_branches len astype _raise_on_nan_and_inf any cast split append _process_vector_observation bool _process_visual_observation array observation_shapes enumerate range len perf_counter push reset method_handlers_generic_handler add_generic_rpc_handlers UnityEnvironment close MockCommunicator obs n_agents close get_agent_group_spec get_step_result reset MockCommunicator zip UnityEnvironment observation_shapes obs zip ones n_agents step close get_agent_group_spec get_step_result MockCommunicator set_actions zeros UnityEnvironment observation_shapes UnityEnvironment close MockCommunicator close RpcCommunicator close RpcCommunicator close RpcCommunicator list extend ObservationProto AgentInfoProto append prod range len fromarray uint8 BytesIO astype save ObservationProto generate_compressed_data extend shape ObservationProto shape tolist extend generate_compressed_data process_pixels rand generate_compressed_data process_pixels rand _process_vector_observation generate_list_agent_proto enumerate generate_compressed_proto_obs rand extend AgentInfoProto _process_visual_observation generate_uncompressed_proto_obs generate_compressed_proto_obs rand AgentInfoProto extend AgentGroupSpec CONTINUOUS batched_step_result_from_proto generate_list_agent_proto range AgentGroupSpec batched_step_result_from_proto DISCRETE generate_list_agent_proto action_mask AgentGroupSpec batched_step_result_from_proto DISCRETE generate_list_agent_proto action_mask AgentGroupSpec batched_step_result_from_proto DISCRETE generate_list_agent_proto action_mask AgentGroupSpec CONTINUOUS batched_step_result_from_proto generate_list_agent_proto action_mask BrainParametersProto agent_group_spec_from_proto extend CONTINUOUS generate_list_agent_proto AgentGroupSpec CONTINUOUS generate_list_agent_proto AgentGroupSpec _parse_side_channel_message _generate_side_channel_data send_int IntChannel FloatPropertiesChannel _parse_side_channel_message _generate_side_channel_data get_property set_property uuid4 _parse_side_channel_message _generate_side_channel_data RawBytesChannel encode send_raw_data get_and_clear_received_messages len buffer read_bool append write_bool IncomingMessage range OutgoingMessage buffer write_int32 read_int32 IncomingMessage OutgoingMessage IncomingMessage write_float32 buffer read_float32 OutgoingMessage read_string write_string buffer IncomingMessage OutgoingMessage IncomingMessage buffer OutgoingMessage read_float32_list write_float32_list set_gauge print find_packages find validate_packages replace endswith add set walk join print extract_version_string set values print join set_academy_version_string set_package_version enumerate split
<img src="docs/images/unity-wide.png" align="middle" width="3000"/> <img src="docs/images/image-banner.png" align="middle" width="3000"/> # Unity ML-Agents Toolkit (Beta) [![docs badge](https://img.shields.io/badge/docs-reference-blue.svg)](https://github.com/Unity-Technologies/ml-agents/tree/latest_release/docs/) [![license badge](https://img.shields.io/badge/license-Apache--2.0-green.svg)](LICENSE) ([latest release](https://github.com/Unity-Technologies/ml-agents/releases/tag/latest_release)) ([all releases](https://github.com/Unity-Technologies/ml-agents/releases)) **The Unity Machine Learning Agents Toolkit** (ML-Agents) is an open-source Unity plugin that enables games and simulations to serve as environments for training intelligent agents. Agents can be trained using reinforcement learning,
1,948
douwekiela/mmfeat
['semantic textual similarity']
['MMFeat: A Toolkit for Extracting Multi-Modal Features']
mmfeat/miner/flickr.py mmfeat/miner/freesound.py demos/6-searchplot/demo.py mmfeat/space/sim.py mmfeat/__init__.py demos/2-esp/demo.py mmfeat/miner/__init__.py mmfeat/base.py demos/1-simrel/demo.py mmfeat/miner/google.py mmfeat/bow/cc.py extract.py demos/4-instruments/demo.py mmfeat/miner/imagenet.py mmfeat/bow/bow.py demos/5-dispersion/demo.py demos/8-imagenet/demo.py mmfeat/bow/__init__.py miner.py demos/3-matlab/demo.py mmfeat/bow/dsift.py mmfeat/miner/bing.py demos/7-cnnlayers/demo.py mmfeat/space/__init__.py mmfeat/space/base.py mmfeat/miner/base.py mmfeat/cnn/__init__.py mmfeat/bow/vw.py mmfeat/bow/aw.py mmfeat/space/mmspace.py gridplot DataObject _unpickle_method _pickle_method BoAW BoW BoCC DsiftExtractor BoVW CNN BaseMiner DailyLimitException BingResult BingMiner FlickrResult FlickrMiner FreeSoundMiner FreeSoundResult GoogleResult GoogleMiner ImageNetResult ImageNetMiner Space AggSpace MMSpace norm cosine int asarray axis set_ticks imshow pad add_inner_title savefig figure ImageGrid resize clf open __class__ lstrip __self__ __name__ __mro__
# MMFeat Multi-modal features toolkit in Python, developed at the University of Cambridge Computer Laboratory. The aim of this toolkit is to make it easier for researchers to use multi-modal features. Both image and sound (i.e., visual and auditory representations) are supported. The following models are currently available: 1. CNN: Convolutional neural network representations for images 2. BoVW: Bag-of-visual-words for images, using DSIFT local descriptors 3. BoAW: Bag-of-audio-words for sound files, using MFCC local descriptors ## Getting started The following dependencies need to be installed: [numpy](http://www.numpy.org), [scipy](http://www.scipy.org), [scikit-learn](http://scikit-learn.org/) and yaml. You may need to install [Pillow](https://pypi.python.org/pypi/Pillow) for reading images from files into arrays. If you want to use the CNN model, you will also need to [install Caffe](http://caffe.berkeleyvision.org/installation.html). For BoAW you will need to [install librosa](https://bmcfee.github.io/librosa/install.html) as well. #### Installing the main dependencies on Ubuntu: ```sh
1,949
dpfried/pragmatic-instructions
['text generation']
['Unified Pragmatic Models for Generating and Following Instructions']
scone/tangrams_models.py util.py stats.py scone/scene.py metrics/bleu.py scone/scene_models.py scone/alchemy.py render.py scone/speaker.py scone/corpus.py scone/turk_analyze.py scone/rational_speaker.py scone/rational_follower.py scone/follower.py scone/alchemy_models.py scone/tangrams.py scone/turk_dump_rational_speaker.py models.py scone/follower_utils.py GlobalAttention Saveable VocabEmbeddings OneHotVocabEmbeddings run_lstm analyze render_pragmatic_follower render_pragmatic_speaker collapse get_stats load_pickle typed_namedtuple split_sequence close flatten dump_pickle contains_subsequence softmax run all_equal GlorotInitializer ngrams call_bleu single_bleu read_file multi_bleu pour AlchemyCorpus mix drain AlchemyFactoredSplit AlchemyFactoredMultiheadContextual AlchemyFactored AlchemyFactoredMultihead try_align add_corpus_args load_corpus_and_data Corpus make_predict_invalid test_on_instances dynet_logsumexp UnfactoredSoftmax ActionLayer evaluate ensemble_follow train max_margin_weighting blank_inference_state make_parser compare_prediction backchain fmt_state Follower beam_ensemble_follow _unpack_beam_item action_in_state_context_bonuses make_parser run RationalSpeakerSentenceSegmented compare_pragmatic_segment make_score_fn make_parser RationalSpeaker run SceneCorpus move exit take_hat no_op enter switch_people SceneFactored SceneFactoredSplit SceneFactoredMultiheadContextual SceneFactoredMultihead test_on_instances Speaker beam_ensemble_speak evaluate blank_inference_state in_training_indicator ensemble_speak make_parser compare_prediction backchain fmt_state train _unpack_beam_item insert remove swap TangramsCorpus TangramsFactoredMultihead TangramsFactoredMultiheadContextual TangramsFactored TangramsFactoredSplit load_turk_results add_subjective value_fractions make_parser add_states_correct annotation_col annotate add_row_annotations run run dump_to_json make_parser load_dumpable_instances_from_speaker_file append add_input output print compare_prediction append append join fill render_state append range len print exp max append namedtuple stdout add_argument runcall parse_known_args ipdb pdb log entry_function decode group write match float join str remove mkdtemp call_bleu rmdir range len add_argument SceneCorpus TangramsCorpus load_train_dev_test AlchemyCorpus corpora_dir Instance actions choice randint len format print id utterances len last_action attention_dist append prev_inference_state current_world_state list zip emax esum list dynet_logsumexp all zip npvalue corpus random INVALID range softmax scalarInput argmax log enumerate len esum list sorted dynet_logsumexp npvalue corpus min INVALID possible_actions reversed scalarInput zip append range log enumerate len join print match_print print_utt zip fmt_state attention_names range len NUM_TRANSITIONS print zip len evaluate ensemble_follow npvalue print id renew_cg compare_prediction append utterances beam_ensemble_follow enumerate zeros_like npvalue append array enumerate predict_invalid save_dir enc_state_dim seed ensemble_dirs test_decode corpus exit Counter save_stats Model train_instances_limit append range format log_train_decode latent_actions shuffle AdamTrainer OneHotVocabEmbeddings mkdir zip load_corpus_and_data random_seed loss_fn join train_epochs load_dir Random print log_dev_decode follow_fn update_epoch Follower len add_argument add_corpus_args ArgumentParser concatenate inputVector ACTIONS set take_action dot_product scalarInput embed_action_in_state_context valid_actions append seed join save_predictions list load_corpus_and_data sorted evaluate items print follower_dirs test_decode corpus verbose zip append random_seed speaker_dirs str sorted print zip fmt_state enumerate RationalSpeakerSentenceSegmented set any sentence_segmented print_stats max RationalSpeaker prev_token BOS list index_word len EOS_INDEX random searchsorted mean softmax zip append argmax range EOS _unpack_beam_item BOS list min EOS_INDEX logsumexp reversed mean enumerate zip append range log EOS len str utterances enumerate single_bleu flatten mean append states list beam_ensemble_speak actions set ensemble_speak zip sum max Speaker decode_fn read_csv states print len loads zip enumerate list keys add_states_correct add_subjective groupby count input_results_file load_turk_results min value_fractions mean annotate ids_to_filter DataFrame to_csv items list DumpableInstance add set append shuffle dump_to_json output_file
# Unified Pragmatic Models for Generating and Following Instructions Daniel Fried, Jacob Andreas, and Dan Klein [NAACL, 2018](https://arxiv.org/abs/1711.04987) This repository currently contains the code for follower and speaker models for the SCONE domains. SAIL is not currently integrated; please contact Daniel Fried if you'd like the code for it, or for other questions about the code. ## Requirements ### Packages - python 3.6 - dynet 2.0 - numpy - scipy
1,950
drewlinsley/ffn_membrane
['boundary detection', 'semantic segmentation']
['Flood-Filling Networks']
ffn/training/models/feedback_hgru_v5_3l.py ffn/training/models/htd_cnn_noseed.py test_jk.py ffn/utils/ortho_plane_visualization.py ffn/utils/geom_utils.py train_old_eval.py ffn/inference/executor.py ffn/inference/resegmentation.py ffn/training/models/prc/layers/v6_mely.py ffn/training/models/htd_cnn_3l_newrf.py clean_up.py membrane/layers/recurrent/feedback_hgru_constrained_3l.py ffn/training/models/prc/feedback_hgru_generic_longfb_3l.py membrane/membrane_ops/optimizers.py membrane/layers/feedforward/pooling.py convert_dataset_hippo.py flexible_hybrid_v2.py ffn/training/models/v6_mely_2l.py ffn/training/models/htd_cnn_3l_trainablestat.py ffn/utils/bounding_box_pb2.py ffn/training/models/prc/v6_mely_2l.py membrane/membrane_ops/metrics.py train_wrapper.py ffn/training/models/prc/feedback_hgru_drew.py run_inference_multi.py ffn/training/mask.py membrane/models/l3_fgru_constr_adabn.py plot_inference.py membrane/layers/recurrent/feedback_hgru.py run_inference_wrapper.py alt_flexible_hybrid.py ffn/inference/inference_pb2.py ffn/training/models/aLN/initialization.py ffn/training/models/layers/feedforward/pooling.py ffn/inference/inference_bak.py ffn/training/models/aLN/helpers_mk2.py ffn/training/models/htd_cnn.py plot_segments.py ffn/training/models/htd_cnn_relu.py ffn/training/models/prc/feedback_hgru_v5_3l_swpgate.py membrane/models/fgru_tmp.py ffn/training/models/prc/feedback_hgru_v5_3l_nu_f.py ffn/training/models/layers/feedforward/initialization.py ffn/training/models/prc/feedback_hgru_v4.py merge_predictions.py ffn/training/models/convstack_3d_shallow.py ffn/inference/resegmentation_analysis.py bharath_flexible_hybrid.py membrane/membrane_ops/initialization.py membrane/membrane_ops/data_utilities.py ffn/training/models/htd_cnn_symbi.py ffn/training/models/htd_cnn_bellyup.py ffn/training/models/htd_cnn_dromu_h.py flexible_hybrid_inf.py build_coordinates.py ffn/training/models/layers/recurrent/initialization.py ffn/utils/bounding_box.py ffn/training/models/convstack_3d_bn.py ffn/training/models/aLN/helpers.py convert_dataset_with_membrane.py membrane/utils/logger.py ffn/training/models/aLN/aLN_3l.py ffn/training/models/aLN/horizontal_net.py run_inference_wrapper_multi.py membrane/membrane_ops/gradients.py ffn/inference/consensus.py ffn/training/models/prc/gradients.py ffn/inference/segmentation.py ffn/training/models/prc/pooling.py ffn/training/augmentation.py ffn/inference/align.py ffn/inference/inference_flags.py plot_example.py ops/gradients.py ffn/utils/vector_pb2.py ffn/inference/resegmentation_pb2.py ffn/training/models/feedback_hgru_v5_3l_notemp_ol.py membrane/layers/feedforward/conv.py ffn/inference/storage.py ffn/training/models/feedback_hgru_v5_3l_notemp.py ffn/training/models/prc/feedback_hgru_v5_3l.py ffn/training/models/prc/feedback_hgru_3l_singlech.py ffn/inference/inference_utils.py membrane/models/fgru.py ffn/utils/png_to_h5.py membrane/membrane_ops/tf_fun.py ffn/training/models/prc/feedback_hgru_3l_fg.py ffn/training/inputs.py ffn/training/models/htd_cnn_3l_in.py ffn/training/models/prc/feedback_hgru_v5_3l_linfb.py flexible_hybrid.py ffn/inference/seed.py ffn/training/models/convstack_3d.py convert_dataset_with_inf_membrane.py ffn/training/models/aLN/pooling.py ffn/training/models/prc/initialization.py train_old.py ffn/training/models/layers/recurrent/pooling.py ffn/training/import_util.py ffn/training/variables.py membrane/membrane_ops/mops.py ffn/training/models/convstack_3d_provided.py membrane/utils/py_utils.py compute_partitions.py ffn/training/models/convstack_3d_in.py ffn/training/models/aLN/horizontal_net_mk2.py ffn/training/models/prc/feedback_hgru_3l_dualch.py ffn/training/models/htd_cnn_dromu.py ffn/training/model.py ffn/training/models/prc/feedback_hgru_v5_3l_noxgate.py ffn/training/models/feedback_hgru_v5_2l.py ffn/inference/consensus_pb2.py ffn/training/optimizer.py ffn/training/optimizer_functional.py train_original.py membrane/models/l3_fgru_constr.py ffn/training/models/prc/feedback_hgru_3l_temporal.py ffn/training/models/convstack_3d_bn_f.py ffn/training/models/layers/recurrent/gradients.py metrics.py ffn/training/models/layers/feedforward/gradients.py run_inference.py ffn/training/models/prc/feedback_hgru_v5_2l.py ffn/inference/inference.py membrane/layers/feedforward/normalization.py ffn/training/models/layers/recurrent/htd_cnn.py ffn/training/models/aLN/normalization.py train_eval_wrapper.py ffn/training/models/prc/feedback_hgru_v5_3l_nu.py ffn/training/models/htd_cnn_homu.py ffn/training/models/layers/feedforward/fgru_original.py ffn/training/models/htd_cnn_3l.py membrane/membrane_ops/mtraining.py ffn/training/models/feedback_hgru_v5_3l_linfb.py ffn/training/models/layers/recurrent/htd_cnn_3l.py ffn/training/models/prc/feedback_hgru_2l.py ffn/inference/movement.py ffn/training/models/htd_cnn_3l_inplace.py ffn/training/models/feedback_hgru_v5_3l_notemp_f.py convert_datasets.py rdirs main make_dir pad_zeros rdirs main make_dir pad_zeros rdirs main make_dir pad_zeros main _int64_feature _bytes_feature split_segmentation_by_intersection compute_partitions load_mask _query_summed_volume adjust_bboxes _summed_volume_table main rdirs main make_dir pad_zeros rdirs main make_dir pad_zeros arand_np class_accuracy arand adapted_rand get_edge main main write_custom_request find_checkpoint find_all_ckpts write_custom_request find_checkpoint find_all_ckpts rdirs main make_dir pad_zeros find_checkpoint find_all_ckpts train_canvas_size save_flags get_example train_eval_size _get_offset_and_scale_map _get_permutable_axes train_ffn train_labels_size define_data_input fixed_offsets fov_moves get_batch EvalTracker main run_training_step _get_reflectable_axes train_image_size max_pred_offsets prepare_ffn train_canvas_size save_flags get_example train_eval_size _get_offset_and_scale_map _get_permutable_axes train_ffn train_labels_size define_data_input fixed_offsets fov_moves get_batch EvalTracker main run_training_step _get_reflectable_axes train_image_size max_pred_offsets prepare_ffn train_canvas_size save_flags get_example train_eval_size _get_offset_and_scale_map _get_permutable_axes train_ffn train_labels_size define_data_input fixed_offsets fov_moves get_batch EvalTracker main run_training_step _get_reflectable_axes train_image_size max_pred_offsets prepare_ffn Aligner Alignment compute_consensus_for_segmentations compute_consensus ThreadingBatchExecutor BatchExecutor visualize_state DynamicImage no_halt Canvas Runner _cmap_rgb1 self_prediction_halt visualize_state DynamicImage no_halt Canvas Runner _cmap_rgb1 self_prediction_halt request_from_flags options_from_flags TimedIter StatCounter Counters compute_histogram_lut match_histogram timer_counter get_policy_fn BaseMovementPolicy FaceMaxMovementPolicy MovementRestrictor get_scored_move_offsets get_starting_location get_target_path get_canvas process process_point IncompleteResegmentationError evaluate_pair_resegmentation compute_iou InvalidBaseSegmentatonError evaluate_endpoint_resegmentation evaluate_segmentation_result parse_resegmentation_filename PolicyGrid3d PolicyPeaks PolicyInvertOrigins ShufflePolicyPeaks BaseSeedPolicy PolicyMembrane PolicyPeaks2d PolicyShuffleMembrane PolicyMax PolicyGrid2d make_labels_contiguous _get_index_dtype clear_dust clean_up split_segmentation_by_intersection reduce_id_bits split_disconnected_components dequantize_probability legacy_segmentation_path checkpoint_path threshold_segmentation object_prob_path clip_subvolume_to_bounds build_mask legacy_subvolume_path atomic_file legacy_object_prob_path load_segmentation_from_source quantize_probability load_origins segmentation_path get_existing_subvolume_path load_segmentation subvolume_path get_corner_from_path get_existing_corners save_subvolume decorated_volume reflection permute_axes xy_transpose PermuteAndReflect import_symbol soften_labels load_from_numpylike create_filename_queue ravel_lom_dims ravel_zyx_dims get_offset_scale offset_and_scale_patches unravel_lom_dims lom_radius redundant_lom lom_dims unravel_zyx_dims load_patch_coordinates_from_filename_queue load_patch_coordinates make_seed crop update_at crop_and_pad FFNModel optimizer_from_flags optimizer_from_flags FractionTracker _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel _predict_object_mask ConvStack3DFFNModel horizontal_net caps2scalar_map feature_forward propagate_labels caps2scalar_filter capscompare labelcompare label_backward get_caps_match capsdot cap_labels caps2scalar_map scalar2caps_map caps2scalar_filter get_mask bundle_switched_transpose_conv sum_over_bb caps_compare label_backward get_conv_and_mask generic_map_combine bb_to_batch softmax_over_bb mix_maps tile_by_bb horizontal_net horizontal_net variance_scaling_initializer xavier_initializer Identity_init batch global_pool max_pool hGRU _Conv3DGrad _Conv2DGrad variance_scaling_initializer xavier_initializer Identity_init global_pool max_pool3d max_pool _Conv3DGrad _Conv2DGrad hGRU hGRU variance_scaling_initializer xavier_initializer Identity_init global_pool max_pool3d max_pool hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU hGRU _Conv3DGrad _Conv2DGrad variance_scaling_initializer xavier_initializer Identity_init global_pool max_pool3d max_pool hGRU hGRU BoundingBox containing intersections intersection ToVector3j To3Tuple ToNumpy3Vector concat_ortho_planes cut_ortho_planes normalize_image down_block conv3d_layer up_block conv3d_transpose_layer conv_layer batch global_pool max_pool3d max_pool hGRU hGRU create_boundary_map affinitize apply_augmentations warp2d check_volume update_defaults random_crop_volume elastic_transform apply_flip interpret_augmentation crop_volume center_crop_volume derive_affinities _Conv3DGrad _Conv2DGrad variance_scaling_initializer xavier_initializer Identity_init class_accuracy arand adapted_rand train_model initialize_tf check_augmentations calculate_pr prepare_data convert_z convert_norm uint8_normalization evaluate_model sample_data test_evaluation run_train_step prepare_idx get_z_idx load_data test_wrapper training_loop evaluation_loop cv_split momentum get_optimizer check_and_clip_grads check_shapes strip_coors count_parameters image_summaries finetune_splits check_early_stop fixed_len_feature int64_feature bytes_feature float_feature update_lr update_config main experiment_params build_model main experiment_params build_model main experiment_params build_model main experiment_params build_model get Logger add_zeros convert_to_tuple add_to_config get_dt_stamp save_npys make_dir flatten_list import_module check_path get_data_pointers _Conv3DGrad _Conv2DGrad str range len makedirs join list print make_dir reversed split range pad_zeros save rdirs run all transpose range Parse astype start stack load print reshape float32 Runner InferenceRequest zeros array rot90 items list defaultdict TFRecordOptions GZIP concatenate shuffle split partition_volumes info max values enumerate uint64 setdefault bitwise_and dict remap_input unique zip zeros ravel bitwise_or enumerate len cumsum astype int32 masks _summed_volume_table build_mask BoundingBox clear_dust load_mask _query_summed_volume set shape prod _summed_volume_table unique info zeros sum array enumerate len append adjusted_by all adjust_bboxes sum todense ones csr_matrix size multiply ravel array amax reshape cast int32 reshape cast int32 sobel array BoundingBox segmentation_output_dir join dump bounding_box request_from_flags MakeDirs model_checkpoint_path str makedirs close write open join int sort append listdir join int sort append listdir len append run image_offset_scale_map split soften_labels load_from_numpylike batch_size load_patch_coordinates ones tolist logical_and offset_and_scale_patches train_labels_size PermuteAndReflect with_membrane train_coords equal constant reshape train_image_size transform_axes shuffle_batch split list float32 placeholder define_tf_graph chain input_image_size sorted popleft train_image_size extend set add any crop_and_pad deque get_scored_move_offsets array logit load_example get_offsets add_patch crop_and_pad make_seed _batch range zip concatenate MakeDirs train_dir seed int time task train_ffn model_name import_symbol split_segmentation_by_intersection split_min_size reduce_id_bits Process load_segmentation_from_source segmentation2 getpid unique info compute_consensus_for_segmentations segmentation1 sqrt power pi sin fromarray concat_ortho_planes expit ndarray as_strided isinstance concatenate reshape cut_ortho_planes strides shape UpdateFromPIL deltas scored_coords _cmap_rgb1 array inference_options Parse InferenceOptions Parse inference_request InferenceRequest time uint8 cumulative_distribution equalize_adapthist tolist astype array range cumulative_distribution range zeros arange insert set_trace set add shape unravel_index argmax array enumerate get logit move_threshold movement_policy_args movement_policy_name loads import_symbol unravel_index tuple argmax shape update str join id_a id_b point md5 Exists output_directory MakeDirs info error array log_info _deregister_client points info process_point range len int all array float sum max info int sum CopyFrom list ComputeOverlapCounts items ravel segmentation_radius start EndpointSegmentationResult parse_resegmentation_filename int max evaluate_segmentation_result PairResegmentationResult point radius compute_iou from_a segmentation_radius from_b float sum array parse_resegmentation_filename origin dict arange zeros_like csr_matrix reshape size unique len reshape unique shape max label any list clear_dust copy dict unique zip ravel split_disconnected_components HasField transpose load split Rename digitize linspace nan astype float32 MakeDirs reduce_id_bits dirname tuple basename search append get_corner_from_path join Glob legacy_segmentation_path Exists checkpoint_path segmentation_path legacy_object_prob_path object_prob_path get_existing_subvolume_path shape BoundingBox intersection invert Alignment expression reshape channels SerializeToString mask align_and_crop logical_not shape WhichOneof clip_subvolume_to_bounds eval fatal expand_bounds decorated_volume zeros values get_existing_subvolume_path min_size threshold HasField split_cc mask convert_to_tensor transpose as_list set_shape rsplit import_module getattr info int Glob search group parse_single_example TFRecordOptions GZIP read dtype list _num_channels iter next array values set_shape py_func array tuple array list tuple extend pad zip append array tuple list full array learning_rate validation_mode as_list trainable_variables str relu print conv3d conv prod batch_norm instance_norm int name concat expand_dims minimum maximum build hGRU minimum propagate_labels relu print multiply square maximum sigmoid multiply conv2d_transpose tile ones_like conv2d capscompare tile as_list reshape labelcompare multiply conv2d tile expand_dims as_list caps2scalar_map exp print multiply square sqrt tile capsdot reshape as_list reshape as_list conv2d as_list as_list reshape transpose as_list constant relu reshape softmax as_list reshape as_list reshape transpose conv2d_transpose as_list reshape as_list conv2d concat bb_to_batch caps2scalar_map tanh get_mask bundle_switched_transpose_conv concat sum_over_bb caps_compare get_conv_and_mask generic_map_combine softmax_over_bb tile_by_bb reshape sqrt float random_uniform truncated_normal reduce_mean reduce_max transpose shape_n conv2d_backprop_filter conv2d_backprop_input get_attr transpose shape_n conv3d_backprop_input_v2 conv3d_backprop_filter_v2 get_attr minimum BoundingBox isinstance end size maximum start any extend minimum list end map maximum start Vector3j isinstance ndarray isinstance list rollaxis copy append array enumerate zeros swapaxes isnan zeros sigmoid shape int relu transpose conv2d pow elu item get_variable pow conv3d elu relu pow elu conv3d_transpose relu reshape random pi AffineTransform shape arange zeros_like rand shape map_coordinates meshgrid gaussian_filter reshape zeros abs shape check_volume affinitize concatenate transpose astype warn range len invert uint8 ones squeeze astype scharr dilate array range append shape randint shape shape interpret_augmentation items list isinstance tuple params GreyAugment abs update_defaults warp2d shape uniform MisalignAugment prepare zip crop_volume augment enumerate minimum WarpAugment maximum BlurAugment dict MissingAugment random_crop_volume apply_flip center_crop_volume len variables_initializer LOCAL_VARIABLES get_collection auc isinstance print convert_z convert_norm uint8_normalization enumerate Saver Session Graph initialize_tf data trainable_variables to_bfloat16 LMS calculate_pr count_parameters update_config get_optimizer run list placeholder cast get_default_graph start_queue_runners configure_model weighted_cross_entropy_with_logits items initialize_tf sigmoid_cross_entropy_with_logits print prepare_data greater float32 sigmoid Coordinator reduce_mean int32 training_loop scalar tf_dtype int list asarray all isinstance strip_coors reshape squeeze min zeros float range enumerate len int concatenate finetune_splits shape any zeros enumerate asarray arange concatenate int permutation arange reshape astype len apply_augmentations concatenate astype getattr expand_dims abs len time sample_data print astype save update_training run shuffle_test sample_data prepare_idx info range test_batch_size run print test_evaluation shape zip enumerate run_train_step save run restore hasattr ones transpose update_test prepare_idx shape test_wrapper update_results derive_affinities range get inf shuffle_train file_pointer update_error close get_z_idx lr zip info update_lr update_step max_steps cv_split load join log_dir savez epochs train_batch_size len get join restore int concatenate shape zeros float round run UPDATE_OPS get_collection list print name histogram zip MomentumOptimizer items list setattr int sep len split asarray all savgol_filter print dumps prod maximum as_list expand_dims ndarray isinstance reshape image mean all fail_function int Logger str range len print join list items save print items list setattr load join replace check_path item
# Flood-Filling Networks Flood-Filling Networks (FFNs) are a class of neural networks designed for instance segmentation of complex and large shapes, particularly in volume EM datasets of brain tissue. For more details, see the related publications: * https://arxiv.org/abs/1611.00421 * https://doi.org/10.1101/200675 This is not an official Google product. # Installation No installation is required, but please ensure that the following dependencies
1,951
drgriffis/Extrinsic-Evaluation-tasks
['word embeddings']
['Characterizing the impact of geometric properties of word embeddings on task performance']
sentence_polarity_classification/preprocess.py subjectivity_classification/preprocess.py subjectivity_classification/cnn.py snli/train.py util.py sentiment_classification/train.py Relation_extraction/preprocess.py subjectivity_classification/data/pre.py sentence_polarity_classification/train.py sentence_polarity_classification/data/pre.py Relation_extraction/train_cnn.py load_embeddings_matrix load_embeddings_dict load_embeddings getWordIdx load_data createTensor predict_classes getPrecision preprocess_data readFile createMatrices wordIdxLookup writeFile get_data extract_tokens_from_binary_parse yield_examples wordIdxLookup preprocess_data readFile createMatrices writeFile print word_filter uniform split open zeros array len array load_embeddings load_embeddings int min len getWordIdx open append zeros range split print add set lower split open load_embeddings_matrix createTensor max range len range len append float print int print split append open dump createMatrices print close load_embeddings_matrix readFile open extract_tokens_from_binary_parse join loads enumerate open list print to_categorical yield_examples array max len
# Extrinsic-Evaluation-tasks Fork of [shashwath94/Extrinsic-Evaluation-tasks](https://github.com/shashwath94/Extrinsic-Evaluation-tasks), with some cleaning to support running all tasks on an arbitrary set of embeddings more easily. Original repository assembled for Rogers et al. (2018) "[What's in Your Embedding, And How It Predicts Task Performance](http://aclweb.org/anthology/C18-1228)". This version of repository assembled and released due to usage in Whitaker et al. (2019) "[Characterizing the impact of geometric properties of word embeddings on task performance](https://arxiv.org/abs/1904.04866)". ## Specific details for each task _References pending_ ## References Bib entry for Rogers et al (2018): ``` @inproceedings{C18-1228,
1,952
drorsimon/image_barycenters
['image morphing']
['Barycenters of Natural Images -- Constrained Wasserstein Barycenters for Image Morphing']
generate_morph.py train.py generate_pix_dataset.py dataloader.py train_dcgan.py generate_h5.py utils.py dcgan_models.py H5Loader get_h5_dataset Generator Encoder Discriminator generate_h5 sinkhorn load_pix2pix sinkhorn_gpu _generate_metric load_images load_models generate_metric morph_project_only preprocess_Q project_on_generator generate_interpolation generate_pix2pix_dataset preprocess_dataset prepare_pix2pix_dataset train_gan train_pix2pix train_gan plot_loss test_encoder plot_result finetune_encoder_with_samples train_encoder_with_noise load_encoder alexnet_norm get_jpg_images denorm load_generator join Compose File close tqdm get_jpg_images mkdir create_dataset enumerate len zeros sum range meshgrid stack zeros range int exp randn print reshape dot sum int ones_like inf zeros_like print reshape astype conv2d repeat cuda item float sum max range max G pix2pix reshape clamp interpolate E sum max load parameters eval load_state_dict module join dataset_name load_pix2pix load_encoder dcgan_latent_size models_save_dir dcgan_num_filters load_generator generate_metric preprocess_Q linspace interpolate save_image clip list Generator append generate_interpolation range cat sinkhorn concatenate stack mkdir zip float join pix2pix print reshape tqdm join paste interpolate save fromarray transpose new size Compose shuffle get_jpg_images mkdir load_generator enumerate join G load_encoder reshape tqdm E join dataset_name generate_h5 dataset_h5_save_dir dataset_base_dir dcgan_image_size test_encoder models_save_dir mkdir finetune_encoder_with_samples train_encoder_with_noise join pix2pix_image_size pix2pix_dataset_name generate_pix2pix_dataset mkdir dataset_base_dir dcgan_image_size join dataset_name chdir system copyfile pix2pix_dataset_name models_save_dir join subplots plot xlabel set_xlim close ylabel savefig mkdir legend max set_ylim int uint8 format subplots join text axis astype subplots_adjust close set_adjustable sqrt imshow flatten savefig mkdir zip randn zero_grad MultiStepLR plot_loss denorm save plot_result cuda Generator squeeze Adam Discriminator append range detach state_dict eval item BCELoss get_h5_dataset enumerate join G criterion backward print parameters train step zero_grad plot_loss save cuda Adam MSELoss load_state_dict append range state_dict Encoder eval item get_h5_dataset enumerate load join G criterion backward print parameters step E zero_grad get_features plot_loss save cuda Adam MSELoss load_state_dict append range state_dict eval item get_h5_dataset enumerate load join G criterion backward print parameters train step E alexnet_norm denorm interpolate features save_image cuda Adam MSELoss load_state_dict iter next range cat requires_grad_ eval stack get_h5_dataset load join G criterion backward reshape parameters step E join endswith extend listdir load parameters eval load_state_dict cuda load parameters eval load_state_dict cuda type_as
# image_barycenters This repository can be used to reproduced the results reported in our [paper](https://arxiv.org/abs/1912.11545), accepted to CVPR 2020. If you use our work, please cite it: ``` @InProceedings{Simon_2020_CVPR, author = {Simon, Dror and Aberdam, Aviad}, title = {Barycenters of Natural Images Constrained Wasserstein Barycenters for Image Morphing}, booktitle = {The IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, month = {June}, year = {2020}
1,953
dsgiitr/ML-Reproducibility-2020-DUQ
['out of distribution detection']
['Uncertainty Estimation Using a Single Deep Deterministic Neural Network']
Models/cnn_duq.py Codes/utils/evaluate_ood.py Codes/rejection_analysis.py Codes/utils/resnet_duq.py utils/resnet.py utils/evaluate_ood.py Models/resnet.py utils/ensemble_eval.py utils/datasets.py Codes/utils/cnn_duq.py utils/resnet_duq.py Codes/Train and Test/DUQ_CIFAR.py Codes/utils/datasets.py Codes/utils/resnet.py Codes/utils/ensemble_eval.py Codes/hist.py Models/resnet_duq.py Codes/Train and Test/DUQ_FM.py Codes/Train and Test/DE.py utils/cnn_duq.py main train test main train_model Model SoftmaxModel CNN_DUQ get_notMNIST FastFashionMNIST get_MNIST get_CIFAR10 get_SVHN get_FashionMNIST NotMNIST get_fm_mnist_ood_ensemble get_cifar10_svhn_ood_ensemble get_ROC_mnist_ensemble get_auroc_classification get_auroc_ood get_fashionmnist_mnist_ood prepare_ood_datasets get_cifar_svhn_ood loop_over_dataloader get_fashionmnist_notmnist_ood get_ROC_mnist ResNet ResNet_DUQ Model SoftmaxModel CNN_DUQ ResNet ResNet_DUQ Model SoftmaxModel CNN_DUQ get_notMNIST FastFashionMNIST get_MNIST get_CIFAR10 get_SVHN get_FashionMNIST NotMNIST get_fm_mnist_ood_ensemble get_cifar10_svhn_ood_ensemble get_ROC_mnist_ensemble get_auroc_classification get_auroc_ood get_fashionmnist_mnist_ood prepare_ood_datasets get_cifar_svhn_ood loop_over_dataloader get_fashionmnist_notmnist_ood get_ROC_mnist ResNet ResNet_DUQ model backward print zero_grad tqdm mean item loss_fn step cuda append enumerate format print eval dataset len get_cifar10_svhn_ood_ensemble state_dict print get_fm_mnist_ood_ensemble nll_loss SGD test ModuleList parameters DataLoader MultiStepLR save append train step range enumerate cuda run get_auroc_classification list ResNet_DUQ shuffle ProgressBar attach int Engine Subset get_cifar_svhn_ood transform len list FastFashionMNIST binary_cross_entropy Engine shuffle Subset SGD Loss parameters DataLoader attach MultiStepLR ProgressBar Accuracy cuda range CNN_DUQ run MNIST Compose FashionMNIST Compose Compose SVHN Compose CIFAR10 Compose NotMNIST concatenate prepare_ood_datasets mean get_MNIST get_FashionMNIST roc_auc_score concatenate prepare_ood_datasets mean get_CIFAR10 get_SVHN roc_auc_score concatenate roc_curve prepare_ood_datasets mean get_MNIST get_FashionMNIST transform DataLoader cat ConcatDataset eval concatenate loop_over_dataloader mean prepare_ood_datasets roc_auc_score mean DataLoader loop_over_dataloader roc_auc_score roc_curve prepare_ood_datasets mean get_MNIST loop_over_dataloader get_FashionMNIST get_CIFAR10 get_SVHN get_MNIST get_FashionMNIST get_notMNIST get_FashionMNIST
## [ML-Reproducibility-2020-DUQ](https://paperswithcode.com/rc2020) # [ [RE] Uncertainty Estimation Using a Single Deep Deterministic Neural Network](https://arxiv.org/abs/2003.02037) This repository is the reproduction of paper "Uncertainty Estimation Using a Single Deep Deterministic Neural Network" by Joost van Amersfoort, Lewis Smith, Yee Whye Teh, Yarin Gal. All codes for training and experiments are provided. They are as colab notebooks. Additionally, py files are provided for training and testing. Training and models are based on codes provided by the author <br> ## Requirements ### Colab notebooks All requirements will be self-installed ### py files To install requirements: ```setup
1,954
dsmic/LearnMultiplyByHand
['learning to execute']
['Learning to Execute']
learnmultiply_schriftlich_limit_traindata.py learnmultiply.py learnmultiply_schriftlich_limit_traindata_subnets.py learnmultiply_schriftlich.py learnmultiply_schriftlich_limit_traindata_dense.py schriftlich_multiplizieren.py mini_imagenet_dataloader.py learnmultiply_schriftlich_few_shot.py few_shot_tests.py OurMiniImageNetDataLoader FindModel Dense_plasticity KerasBatchGenerator get_layer_output_grad scale_gradient_layer debug get_FindModel ScaleGradientLayer BiasLayer all_layers TerminateKey print_FindModels call parser get_weight_grad printdeb CTRL_C KerasBatchGenerator list_to_string add_translate check_all_chars_in str_to_int_list attentions_layer one_data KerasBatchGenerator list_to_string add_translate check_all_chars_in str_to_int_list n_str_to_int_list attentions_layer one_data KerasBatchGenerator list_to_string add_translate KerasPairBatchGenerator check_all_chars_in str_to_int_list n_str_to_int_list attentions_layer one_data KerasBatchGenerator list_to_string add_translate check_all_chars_in str_to_int_list n_str_to_int_list attentions_layer one_data KerasBatchGenerator list_to_string add_translate check_all_chars_in str_to_int_list n_str_to_int_list attentions_layer one_data KerasBatchGenerator SelectSubnetLayer list_to_string add_translate print_test check_all_chars_in SelectSubnetLayer2 str_to_int_list n_str_to_int_list attentions_layer select_subnet_layer MiniImageNetDataLoader add_translate one_data parse_args add_argument ArgumentParser print set_trace print debug layers isinstance printdeb sum shape layers isinstance extend append print layers isinstance function _feed_inputs get_gradients _feed_targets _feed_sample_weights f trainable_weights total_loss _standardize_user_data function _feed_inputs get_gradients _feed_targets _feed_sample_weights output f total_loss _standardize_user_data softmax append revert range append revert str move_or_set int print get_int2 get_int1 append range len lstm_num str format chr ord print list_to_string generate input argmax max
# LearnMultiplyByHand A neural network is teached multiplication by hand Some previous work was done e.g. "Learning to Execute" (https://arxiv.org/abs/1410.4615). Trying to break the problem down it seems, that even simple multiplication is not learned with high accuracy. Therefore we try to teach multiplication by hand to a neural network: e.g. 6046588*80647= 48372704 00000000 36279528
1,955
dssresearch/GLISTER
['active learning']
['GLISTER: Generalization based Data Subset Selection for Efficient and Robust Learning']
models/resnet.py run_knnsubmod_selection_fullbatch.py toy_data.py models/mnist_net.py models/cifar_set_function_act_learn.py runs_deep.py models/grad_computed_onestep_selection.py run_active_learning.py active_learning.py models/cifar10net1.py models/FacilityLocation.py models/cifar10net.py models/__init__.py models/set_function_act_learn.py models/set_function_stochastic_onestep_taylor.py models/logistic_regression.py models/set_function_craig.py badge/query_strategies/strategy.py badge/resnet.py badge/query_strategies/badge_sampling.py models/lr_scheduler.py utils/custom_dataset.py models/simpleNN_net.py mnist_timing_analysis.py runs_dss.py models/set_function_all.py models/set_function_onestep_taylor.py dss_deep.py runs_dss_.py models/set_function_onestep.py models/mnist_net1.py models/cifar_set_function_grad_computation_taylor.py runs_time.py models/set_function_ideas.py mnist_runs.py models/master_convex.py dss_classimb.py timing_analysis.py models/set_function_grad_computation_taylor.py models/set_function_debug.py badge/my_run.py active_learning_taylor perform_knnsb_selection run_stochastic_Facloc gen_rand_prior_indices train_model_craig gen_rand_prior_indices perform_knnsb_selection train_model_taylor train_model_mod_taylor train_model_random write_knndata train_model_mod_online train_model_random_online train_model_Facloc train_model_craig perform_knnsb_selection facloc_reg_train_model_online_taylor run_stochastic_Facloc model_eval_loss train_model_online random_greedy_train_model_online_taylor train_model_mod_taylor train_model_craig train_model_taylor perform_knnsb_selection train_model_mod_taylor train_model_craig train_model_taylor generate_gaussian_quantiles_data generate_linear_seperable_data diff_class_prior generate_classification_data mlpMod DataHandler3 return_accuracies linMod ResNet ResNet18 ResNet34 Bottleneck ResNet101 test ResNet50 BasicBlock ResNet152 init_centers BadgeSampling Strategy CifarNet CifarNet WeightedSetFunctionLoader PriorSetFunctionLoader_2 SetFunctionLoader_2 PriorWeightedSetFunctionLoader SetFunctionSupervisedCRAIG PriorSetFunctionLoader_2 PriorWeightedSetFunctionLoader WeightedSetFunctionLoader SetFunctionLoader_2 SetFunctionFacLoc train_model_random write_knndata train_model_mod_online train_model_random_online train_model_Facloc train_model_craig perform_knnsb_selection facloc_reg_train_model_online_taylor run_stochastic_Facloc model_eval_loss train_model_online random_greedy_train_model_online_taylor LogisticRegNet WarmUpLR train_model_random train_model_online_onestep train_model_knnsb perform_knnsb_selection train_model_online_taylor CRAIG plot_current_subset MnistNet MnistNet ResNet ResNet18 ResNet34 Bottleneck ResNet101 ResNet50 BasicBlock ResNet152 SetFunctionTaylor SetFunctionBatch SetFunctionFacLoc SetFunctionFacLoc SetFunctionCompare SetFunctionCRAIG_Super SetFunctionCRAIG SetFunctionTaylorDeep_SuperRep SetFunctionTaylorDeep SetFunctionTaylorDeep_Super SetFunctionTaylorMeta SetFunctionTaylor SetFunctionBatch SetFunction2 SetFunctionCRAIG_Super PerClassDeepSetFunction DeepSetFunction PerClassNonDeepSetFunction SetFunction SetFunctionTaylorDebug SetFunctionCompare SetFunctionTaylorDeep SetFunctionTaylor SetFunctionBatch WeightedSetFunctionLoader SetFunctionLoader_2 NonDeepSetFunctionLoader_2 SetFunctionTaylorDeep_Super_ReLoss_Mean SetFunctionTaylorDeep_ReLoss_Mean SetFunctionTaylorDeep_Super_ReLoss SetFunctionTaylorDeep_SuperDistance SetFunctionTaylorDeep_SuperRep SetFunctionLoader_2 SetFunctionBatch SetFunctionLoader WeightedSetFunctionLoader SetFunctionLoader_2 SetFunctionBatch WeightedSetFunctionLoader SetFunctionLoader_2 ThreeLayerNet TwoLayerNet census_load CustomDataset_WithId write_knndata CustomDataset libsvm_file_load csv_file_load load_dataset_custom load_mnist_cifar create_noisy create_imbalance genfromtxt join int str print call savetxt append run int list remove arange extend choice numpy range len seed int TwoLayerNet list arange get_state extend range set difference choice set_state SetFunctionFacLoc cpu to lazy_greedy_max log len Softmax model batch_sampler zero_grad SGD DataLoader clamp_ naive_greedy_max lazy_greedy_max cuda seed list get_state topk step run_stochastic_Facloc load_state_dict to SetFunctionBatch range CrossEntropyLoss cat cross_entropy state_dict CustomDataset_WithId set choice eval set_state manual_seed deepcopy TwoLayerNet int entropy backward print extend difference parameters filter fn perform_knnsb_selection SetFunctionFacLoc zeros train SetFunctionTaylor exists model zero_grad SGD DataParallel criterion_nored lazy_greedy_max seed device_count CRAIG to CrossEntropyLoss range eval manual_seed item float type LogisticRegNet backward print dot parameters zeros step arange model zero_grad SGD DataParallel naive_greedy_max lazy_greedy_max seed list get_state step device_count load_state_dict append to SetFunctionBatch cat CrossEntropyLoss state_dict range grad choice set eval set_state manual_seed item LogisticRegNet deepcopy time int criterion backward print extend difference parameters SetFunctionFacLoc zeros SetFunctionTaylor len model zero_grad SGD DataParallel seed device_count to range CrossEntropyLoss eval item manual_seed LogisticRegNet criterion backward print parameters zeros step join savetxt run elapsed_time record DataLoader BatchSampler tensor str list ResNet18 load_state_dict Event state_dict synchronize deepcopy int now RandomSampler MnistNet array elapsed_time arange model record zero_grad SGD DataLoader naive_greedy_max tensor seed str list ResNet18 load_state_dict to Event CrossEntropyLoss range state_dict synchronize set choice manual_seed float type deepcopy int criterion backward print now extend difference parameters SetFunction zeros MnistNet step len elapsed_time model record zero_grad SGD DataLoader naive_greedy_max tensor seed str list ResNet18 load_state_dict to Event CrossEntropyLoss range state_dict synchronize set manual_seed float type deepcopy int criterion backward print now difference parameters SetFunction zeros MnistNet step len elapsed_time model record zero_grad indices SGD DataLoader naive_greedy_max tensor seed str ResNet18 load_state_dict to Event CrossEntropyLoss cat state_dict range WtSetFunction synchronize manual_seed float type enumerate deepcopy int criterion backward print extend Subset now parameters zeros MnistNet step len elapsed_time model record zero_grad SGD DataLoader seed ResNet18 to Event CrossEntropyLoss range synchronize manual_seed enumerate criterion backward print parameters zeros MnistNet step elapsed_time model record zero_grad SGD DataLoader seed ResNet18 to Event CrossEntropyLoss range synchronize manual_seed enumerate criterion backward print parameters zeros MnistNet step elapsed_time model record zero_grad SGD DataLoader seed ResNet18 to Event CrossEntropyLoss range synchronize choice manual_seed enumerate criterion backward print parameters zeros MnistNet step MnistNet append elapsed_time model record zero_grad SGD DataLoader seed ResNet18 to Event CrossEntropyLoss range synchronize manual_seed enumerate criterion backward print parameters zeros MnistNet step process_time TwoLayerNet process_time str TwoLayerNet process_time BatchSampler str list TwoLayerNet time RandomSampler write_knndata time class_wise ceil SetFunctionTaylorDeep_ReLoss_Mean int list shuffle extend choice set difference append range arange run show list scatter savefig range make_blobs concatenate set choice int print min extend difference figure array len show list diff_class_prior concatenate print extend set choice difference make_gaussian_quantiles scatter array range run show list diff_class_prior make_classification print concatenate extend set choice difference scatter array range run seed update format print mlpMod exit BadgeSampling query load_dataset_custom item manual_seed zeros train range predict len randn Variable ResNet18 print size net sum T abs rv_discrete eig astype set_trace matmul append argmax range len SetFunction str reshape transpose get_figure savefig append DataFrame criterion model print backward zero_grad SGD range device_count DataParallel parameters eval item to step CrossEntropyLoss LogisticRegNet device_count DataParallel eval item LogisticRegNet model zero_grad SGD DataParallel naive_greedy_max device_count load_state_dict to CrossEntropyLoss range state_dict eval item LogisticRegNet deepcopy time criterion backward print parameters SetFunction step model zero_grad SGD DataParallel naive_greedy_max SetFunctionTaylor device_count load_state_dict to CrossEntropyLoss range state_dict eval item LogisticRegNet deepcopy time criterion backward print parameters step model zero_grad SetFunctionCRAIG SGD DataParallel criterion_nored lazy_greedy_max len step device_count ceil append to CrossEntropyLoss range mean eval item LogisticRegNet time criterion backward print parameters numpy plot_current_subset array save array save dict array save enumerate view load_dataset_custom train_test_split load_mnist_cifar int arange reshape min choice row_stack zeros max range len int choice arange len seed join census_load load_digits CustomDataset libsvm_file_load csv_file_load transform create_noisy train_test_split StandardScaler fit_transform create_imbalance MNIST int list arange FashionMNIST Compose min extend Subset choice CIFAR10 zeros numpy range len
#GLISTER, a GeneraLIzation based data Subset selecTion for Efficient and Robust learning framework This repo contains implementation of both GLISTER-ONLINE and GLISTER-ACTIVE under various diffrent # Dependencies To run this code fully, you'll need [PyTorch](https://pytorch.org/) (we're using version 1.4.0) and [scikit-learn](https://scikit-learn.org/stable/). We've been running our code in Python 3.7.
1,956
dstallmann/cell_cultivation_analysis
['time series']
['Towards an Automatic Analysis of CHO-K1 Suspension Growth in Microfluidic Single-cell Cultivation']
vae/dataloader.py effnet/dataloader.py vae/radam.py effnet/plotlyplot.py vae/resultcleaner.py vae/bayes_opt/bayesian_optimization.py vae/cli.py vae/VAE.py vae/bayes_opt/__init__.py image_pipeline/watershed.py vae/bayes_opt/observer.py vae/learner.py vae/bayes_opt/util.py effnet/efftest.py vae/plotlyplot.py vae/representer.py vae/metalearning.py vae/bayes_opt/target_space.py vae/bayes_opt/event.py model_test CustomDatasetFromImages model_train EffNetReg loss_function createPlots comparisonPlot createPlot createPlotWithMean main CustomDatasetFromImages sample_representation set_seed model_test learn evaluate represent showcase load_log save_log model_train playSound init_weights reset_loss_sums loss_function actual_showcase main scoring createPlots comparisonPlot createPlot createPlotWithMean AdamW RAdam PlainRAdam create_umap reparameterize UnFlatten Flatten VAE Observable Queue BayesianOptimization Events _get_default_logger JSONLogger ScreenLogger Observer _Tracker TargetSpace _hashable acq_max load_logs ensure_rng Colours UtilityFunction mse_loss view model zero_grad where numpy around dataset abs cuda round str ones append sum concatenate subtract float enumerate time backward print divide isnan loss_function train step len model where around dataset abs cuda round str ones append sum range concatenate subtract eval float enumerate time print divide isnan loss_function zeros numpy len show line plot read_csv drop show add_trace line plot reshape mean Scatter read_csv drop createPlot createPlotWithMean add_trace plot reshape flatten mean Figure update_layout range Scatter read_csv append len inter_dim_i weight_decay ArgumentParser regressor_start test_interval delete_checkpoints KLD_l_f leak_enc plot_interval syn_tr_name parse_args bneck_i directory leak_dec checkpoint_interval r_l_f bs lr checkpoint s dropout_fc n dropout_enc syn_te_name d_l_f add_argument epochs manual_seed_all seed manual_seed str close write open sample_start str view write close add sample_end cpu save_image open close splitlines open exp exit playSound pow sum item save_log model_train playSound reset_loss_sums save dataset str range format model_test showcase flush int time remove represent evaluate print createPlots len sample_representation Variable eval cuda enumerate eval reset_loss_sums actual_showcase makedirs eval fill_ weight xavier_normal cuda open str set_seed load_log Adam copyfile load_state_dict format learn close load int join print write parameters isfile quit makedirs print main str test load set_aspect str UMAP dark_palette chdir print glob extend set title scatter savefig clf color_palette cpu fit_transform cuda minimize reshape uniform ac max x isinstance RandomState isinstance
# Towards an Automatic Analysis of CHO-K1 Suspension Growth in Microfluidic Single-cell Cultivation These is the sourcecode for the paper “Towards an Automatic Analysis of CHO-K1 Suspension Growth in Microfluidic Single-cell Cultivation”, for the Bioinformatics journal. ## Usage instructions Use Python 3 (perferably 3.7.3) and the requirements.txt and your favorite module management tool to make sure all required modules are installed. CUDA is required to run the project. We recommend to use CUDA 11.0, but 10.1 or 10.2 should work too. Should you have any trouble to install torch and torchvision with CUDA enabled, you can append to the module installation command to get the packages directly from pytorch.org. ``` -f https://download.pytorch.org/whl/torch_stable.html ``` Make sure the data directory contains the folders 128p_bf etc. and has the same parental path as the vae folder. It should look like this: . ├── ...
1,957
dtak/tree-regularization-public
['time series']
['Beyond Sparsity: Tree Regularization of Deep Models for Interpretability']
datasets.py train.py test.py model.py map_3d_to_2d gen_synthetic_dataset build_mlp safe_log softplus make_grad_softplus mse sigmoid build_gru WeightsParser get_ith_minibatch_ixs_fences visualize MLP prune_label build_batched_grad_fences get_ith_minibatch_ixs make_graph_minimal build_batched_grad GRU GRUTree average_path_length exp hstack dot multinomial binomial zeros array range shape T arange WeightsParser add_shape zip WeightsParser add_shape enumerate exp zeros_like logical_not log1p asarray node_count arange apply dot bincount float slice concatenate len write_pdf graph_from_dot_data export_graphviz make_graph_minimal get_nodes get_label prune_label set_label
# NumPy Autograd Implementation This repository includes a toy signal-and-noise HMM dataset and a basic implementation of the Tree-regularized GRU model in NumPy Autograd. Please find the ArXiv copy here: https://arxiv.org/abs/1711.06178. For more on NumPy Autograd, see https://github.com/HIPS/autograd. ## Setup Create a new conda environment and activate it. ``` conda create -n interpret python=2 source activate interpret ``` Install the necessary libraries.
1,958
dtamayo/spock
['time series']
['A Bayesian neural network predicts the dissolution of compact planetary systems']
run_integrations/runcomparison.py run_integrations/runresonant.py spock/feature_functions.py generate_training_data/generate_data.py run_integrations/runfunctions.py spock/deepregressor.py spock/modelfitting.py spock/tseries_feature_functions.py spock/test/test_nbody.py run_integrations/runresonantscript.py spock/test/test_simsetup.py spock/analyticalclassifier.py spock/version.py generate_training_data/generate_metadata.py spock/AMD_functions.py paper_plots/generatePratios.py spock/additional_feature_functions.py generate_training_data/clean.py spock/featureclassifier.py generate_training_data/featuresNorbits10000.0Nout80trio/generate_data.py spock/nbodyregressor.py spock/test/test_regression.py run_integrations/runrandom.py spock/spock_reg_model.py run_integrations/runrandomscript.py setup.py generate_training_data/training_data_functions.py generate_training_data/additional_featuresNorbits10000.0Nout80trio/generate_data.py spock/test/test_analytical.py spock/test/test_classifier.py jupyter_examples/ipynb2py.py spock/simsetup.py spock/__init__.py ttvsystems massratios labels nonressystems training_data gen_training_data collision get_resonant run_resonant logunif run_resonant_condition run_random additional_get_tseries additional_features AMD relative_AMD_crit F AMD_crit calc_tau calc_tau_pair eminus_max calc_tau_pairs AnalyticalClassifier exponential_decaying_prior fast_truncnorm fitted_prior DeepRegressor generate_dataset data_setup_kernel flat_prior FeatureClassifier get_tseries get_pairs find_strongest_MMR resonant_period_ratios populate_trio farey_sequence features unstable_error_fraction tnr_npv_curve stable_unstable_hist PR_curve calibration_plot train_test_split hasnull ROC_curve NbodyRegressor init_sim_parameters check_valid_sim check_hyperbolic set_integrator_and_timestep mlp safe_log_erf save_swag soft_clamp get_data SWAGModel load_swag CustomOneCycleLR VarModel get_tseries get_pairs get_extended_tseries populate_extended_trio populate_trio features TestClassifier longstablesim hyperbolicsim rescale unstablesimecc TestClassifier unstablesim longstablesim hyperbolicsim escapesim rescale solarsystemsim TestNbody unstablesim longstablesim hyperbolicsim escapesim rescale vstablesim solarsystemsim TestRegressor unstablesim longstablesim TestRegressorClassification hyperbolicsim escapesim rescale vstablesim solarsystemsim TestSimSetup unstablesim ttvsystems massratios labels nonressystems training_data gen_training_data collision get_resonant run_resonant logunif run_resonant_condition run_random additional_get_tseries additional_features AMD relative_AMD_crit F AMD_crit calc_tau calc_tau_pair eminus_max calc_tau_pairs AnalyticalClassifier exponential_decaying_prior fast_truncnorm fitted_prior DeepRegressor generate_dataset data_setup_kernel flat_prior FeatureClassifier get_tseries get_pairs find_strongest_MMR resonant_period_ratios populate_trio farey_sequence features unstable_error_fraction tnr_npv_curve stable_unstable_hist PR_curve calibration_plot train_test_split hasnull ROC_curve NbodyRegressor init_sim_parameters check_valid_sim check_hyperbolic set_integrator_and_timestep mlp safe_log_erf save_swag soft_clamp get_data SWAGModel load_swag CustomOneCycleLR VarModel get_tseries get_pairs get_extended_tseries populate_extended_trio populate_trio features TestClassifier longstablesim hyperbolicsim rescale unstablesimecc unstablesim escapesim solarsystemsim TestNbody vstablesim TestRegressor TestRegressorClassification TestSimSetup t P SimulationArchive Simulation m SimulationArchive runfunc SimulationArchive init_sim_parameters compute from_pandas training_data to_csv DataFrame read_csv log10 to_Poincare Poincare integrate P AndoyerHamiltonian Simulation Andoyer pi tlib floor randrange max seed move_to_com add uniform ceil a m logunif sqrt from_elements float int G Random particles min to_Simulation get_Xstarres randint Phi_to_Z automateSimulationArchive format integrate P get_resonant print automateSimulationArchive integrate P get_resonant conditionfunc seed time integrate P Simulation abs particles min calculate_energy pi add sqrt uniform log10 save move_to_com initSimulationArchive max get_pairs integrate P t AMD linspace nan populate_trio append zeros enumerate get_pairs abs log find_strongest_MMR OrderedDict log10 append a e AMD_crit mean nan zip enumerate additional_get_tseries particles m median std sqrt G particles m copy sqrt move_to_com a relative_AMD_crit brenth arctan min sqrt sin particles m copy sqrt move_to_com calculate_angular_momentum T abs identity pi Neccentricity_matrix sqrt eta0_vec eigh arcsin array kappa0_vec P pomega particles eminus_max cos e sqrt sin m a abs log inf from_Simulation dt isnan array N_real inf from_Simulation dt isnan array range int list get_extended_tseries init_sim_parameters astype float32 copy data_setup_kernel OrderedDict repeat append array values enumerate normal reshape range zeros_like concatenate cos nan_to_num sin zeros range append int int list floor ceil array range sorted particles a inf resonant_period_ratios pomega particles min cos e sqrt nan sin m a abs max n find_strongest_MMR particles sqrt calculate_megno m enumerate get_pairs integrate min dt isnan t linspace nan populate_trio append zeros abs enumerate get_tseries get_pairs particles OrderedDict nan zip append median a std enumerate sum int read_csv values apply train_test_split roc_curve roc_auc_score precision_recall_curve train_test_split auc linspace train_test_split ravel enumerate auc train_test_split sqrt histogram append train_test_split sum range len sqrt log10 histogram append train_test_split sum range len calculate_orbits min particles array sqrt min array nan move_to_com set_integrator_and_timestep init_megno check_valid_sim m a max load concatenate Variable reshape FloatTensor fit print copy PowerTransformer type DataLoader TensorDataset train_test_split StandardScaler BoolTensor open list extend reversed Softplus ReLU range zeros_like where save load init_params str find_strongest_MMR calculate_orbits inc Omega pomega particles e sqrt calculate_megno m a theta enumerate get_pairs integrate min t linspace nan populate_extended_trio append zeros enumerate Simulation move_to_com add m a Simulation move_to_com add m a add Simulation add particles Simulation Simulation move_to_com add m a Simulation move_to_com add m a add Simulation add Simulation
# SPOCK 🖖 **Stability of Planetary Orbital Configurations Klassifier** [![image](https://badge.fury.io/py/spock.svg)](https://badge.fury.io/py/spock) [![image](https://travis-ci.com/dtamayo/spock.svg?branch=master)](https://travis-ci.com/dtamayo/spock) [![image](http://img.shields.io/badge/license-GPL-green.svg?style=flat)](https://github.com/dtamayo/spock/blob/master/LICENSE) [![image](https://img.shields.io/badge/launch-binder-ff69b4.svg?style=flat)](http://mybinder.org/repo/dtamayo/spock) [![image](http://img.shields.io/badge/arXiv-2007.06521-green.svg?style=flat)](http://arxiv.org/abs/2007.06521) [![image](http://img.shields.io/badge/arXiv-2101.04117-green.svg?style=flat)](https://arxiv.org/abs/2101.04117) [![image](http://img.shields.io/badge/arXiv-2106.14863-green.svg?style=flat)](https://arxiv.org/abs/2106.14863) ![image](https://raw.githubusercontent.com/dtamayo/spock/master/paper_plots/spockpr.jpg)
1,959
dtrizna/StyleTransfer
['style transfer']
['A Neural Algorithm of Artistic Style']
modules/utils.py mymodel.py keras_original.py modules/transfer.py modules/cost.py deprocess_image Evaluator gram_matrix eval_loss_and_grads content_loss total_variation_loss preprocess_image style_loss compute_content_cost compute_style_cost_one_layer total_cost vgg19_model gram_matrix generate_noise_image reshape_and_normalize_image CONFIG expand_dims preprocess_input img_to_array load_img reshape transpose astype dot transpose batch_flatten permute_dimensions gram_matrix square reshape astype f_outputs as_list reshape subtract square reduce_sum as_list reshape transpose subtract square reduce_sum gram_matrix VGG19 reshape astype reshape MEANS shape
Algorithm initialy was described in https://arxiv.org/abs/1508.06576 Here's what the program will have to do: Create an Interactive Session [DONE] Load the content image [DONE] Load the style image [DONE] Randomly initialize the image to be generated [DONE] Load the VGG19 model [DONE] Build the TensorFlow graph: Run the content image through the VGG19 model and compute the content cost [DONE] Run the style image through the VGG19 model and compute the style cost [DONE]
1,960
dubai03nsr/Polaratio
['graph clustering']
['Polaratio: A magnitude-contingent monotonic correlation metric and its improvements to scRNA-seq clustering']
run.py
# Polaratio Polaratio is a monotonic correlation metric that accounts for the magnitude of separation among observations. ![Polaratio](images/figure.png) **(a)**: The Polaratio distance between two variables is defined as the ratio of the total area between pairs of points with a negative slope to the total area between pairs of points with a positive slope. The Polaratio coefficients, from left to right, are +0.98, -0.98, and +0.31. **(b)**: To apply Polaratio to single-cell clustering, we compute the Polaratio distance between every pair of cells with respect to their gene expression values and pass the resulting distance matrix into various clustering algorithms. We then select the top performing clustering algorithm according to the greatest Silhouette index. ## Dependencies - Python (at least 2.7) - C++ (at least GNU 11)
1,961
ducha-aiki/manifold-diffusion
['image retrieval']
['Efficient Diffusion on Region Manifolds: Recovering Small Objects with Compact CNN Representations']
example_evaluate_with_diff.py diffussion.py sim_kernel cg_diffusion dfs_trunk topK_W find_trunc_graph normalize_connection_graph fsr_rankR csr_matrix reshape sqrt array diagonal sum diags argsort T range minimum list range extend set T time sim_kernel setdiff1d arange concatenate csr_matrix minres topK_W argsort find_trunc_graph eye append normalize_connection_graph range len concatenate reshape minres argsort eye append range T concatenate csr_matrix reshape dot argsort append sum diags range eigsh
This is simple python re-implementation of the algorithms from papers Iscen.et.al "[Fast Spectral Ranking for Similarity Search](https://arxiv.org/abs/1703.06935)", CVPR2018 and Iscen et.al "[Efficient Diffusion on Region Manifolds: Recovering Small Objects with Compact CNN Representations](https://arxiv.org/abs/1611.05113)" CVPR 2017. It is NOT authors implementation and some parts, e.g. sparsification, truncation, etc. are missing. Example of usage: copy files into [python](https://github.com/filipradenovic/revisitop/tree/master/python) directory of the RevisitOP benchmark and run python example_evaluate_with_diff.py Expected output: Plain >> roxford5k: mAP E: 84.81, M: 64.67, H: 38.47
1,962
duchao0726/DUAL
['click through rate prediction', 'gaussian processes']
['Exploration in Online Advertising Systems with Deep Uncertainty-Aware Learning']
patches/attention.py dataset.py batchrunner_dnn.py models.py patches/activation.py patches/rnn.py utils.py main.py product_dict exp_runner fopen load_dict unicode_to_utf8 DataIterator prepare_data evaluate write_summary Model Model_DNN Model_WideDeep Model_DIEN Model_PNN Model_DIN get_floats param_tag get_ints calc_auc setup_logging dice prelu VecAttGRUCell din_fcn_attention din_attention dynamic_rnn _dynamic_rnn_loop _reverse_seq _best_effort_input_batch_size raw_rnn static_rnn _is_keras_rnn_cell _infer_state_dtype static_bidirectional_rnn _should_cache bidirectional_dynamic_rnn static_state_saving_rnn _rnn_step _transpose_batch_time _maybe_tensor_shape_from_tensor join list product append keys values name format pop print endswith astype array zip append max enumerate len calculate prepare_data tolist zip append calc_auc flush Summary add_summary log10 floor join setFormatter getLogger addHandler strftime dict Formatter install FileHandler makedirs append sorted reshape square sigmoid sqrt reduce_mean dense ones_like isinstance print reshape concat transpose where matmul shape softmax tile expand_dims equal dense ones_like prelu isinstance reshape concat transpose where matmul shape softmax tile expand_dims equal get_shape concatenate transpose concat rank set_shape shape value all is_sequence Tensor isinstance _get_control_flow_context executing_eagerly get_shape _copy_some_through call_cell assert_same_structure flatten set_shape zip pack_sequence_as cond get_shape tuple merge_with unknown_shape stack set_shape reverse_sequence unstack zip append _reverse assert_like_rnncell assert_like_rnncell minimum value constant output_size _best_effort_input_batch_size tuple while_loop reduce_max _concat maximum flatten shape set_shape map_structure_up_to zip pack_sequence_as reduce_min state_size assert_like_rnncell assert_like_rnncell is_sequence static_rnn state flatten pack_sequence_as state_size tuple flatten pack_sequence_as _reverse_seq assert_like_rnncell
# Deep Uncertainty-Aware Learning (DUAL) Code for reproducing most of the results in the paper: [Exploration in Online Advertising Systems with Deep Uncertainty-Aware Learning](https://arxiv.org/abs/2012.02298). Chao Du, Zhifeng Gao, Shuo Yuan, Lining Gao, Ziyan Li, Yifan Zeng, Xiaoqiang Zhu, Jian Xu, Kun Gai and Kuang-chih Lee. SIGKDD 2021. :warning: The code is still under development. ## Environment settings and libraries we used in our experiments This project is tested under the following environment settings: - OS: Ubuntu 18.04.5 LTS - CPU: Intel(R) Xeon(R) Platinum 8163 - GPU: N/A - Python: 2.7.17
1,963
dulucas/Displacement_Field
['depth estimation', 'monocular depth estimation']
['Predicting Sharp and Accurate Occlusion Boundaries in Monocular Depth Estimation Using Displacement Fields']
model/nyu/df_nyu_rgb_guidance/config.py model/nyu/df_nyu_rgb_guidance_pos_encoding_attention_loss/train.py lib/utils/init_func.py lib/engine/logger.py model/nyu/df_nyu_depth_only/dataloader.py lib/engine/version.py model/nyu/df_nyu_rgb_guidance_pos_encoding_attention_loss/config.py lib/misc/utils.py lib/backbone/resnet.py lib/utils/pyt_utils.py model/nyu/df_nyu_rgb_guidance/train.py model/nyu/df_nyu_depth_only/unet.py model/nyu/df_nyu_depth_only/df.py lib/datareader/img_utils.py model/nyu/df_nyu_rgb_guidance/df.py model/nyu/df_nyu_depth_only/config.py lib/layers/basic_module.py model/nyu/df_nyu_rgb_guidance_pos_encoding_attention_loss/df.py lib/engine/lr_policy.py model/nyu/df_nyu_rgb_guidance/unet.py lib/datasets/nyu.py model/nyu/df_nyu_rgb_guidance/dataloader.py lib/engine/engine.py model/nyu/df_nyu_depth_only/train.py model/nyu/df_nyu_rgb_guidance_pos_encoding_attention_loss/dataloader.py model/nyu/df_nyu_rgb_guidance_pos_encoding_attention_loss/unet.py conv1x1 ResNet resnet50 Bottleneck resnet152 conv3x3 resnet34 resnet18 BasicBlock resnet101 pad_image_to_shape random_rotation generate_random_crop_pos normalize_depth random_mirror center_crop get_2dshape normalize random_crop_pad_to_shape random_scale_with_length random_crop updown_sampling resize_ensure_shortest_edge random_scale random_uniform_gaussian_blur random_gaussian_blur rgb2gray pad_image_size_to_multiples_of generate_mask_by_shifting NYUDataset State Engine get_logger LogFormatter MultiStageLR BaseLR LinearIncreaseLR PolyLR ChannelAttention RefineResidual AttentionRefinement FeatureFusion SELayer ConvBnLeakyRelu ConvBnRelu BNRefine SeparableConvBnRelu SeparableConvBnLeakyRelu GlobalAvgPool2d SeparableRefineResidual get_params __init_weight group_weight init_weight load_model _dbg_interactive LogFormatter parse_devices get_logger ensure_dir extant_file link_file open_tensorboard add_path get_train_loader TrainPre Displacement_Field Mseloss Unet open_tensorboard add_path get_train_loader TrainPre Displacement_Field Mseloss Unet open_tensorboard add_path get_train_loader TrainPre Displacement_Field Mseloss concatpositionalembed positionalencoding2d multipositionalembed Unet addpositionalembed load_url ResNet load_state_dict load_url ResNet load_state_dict join ResNet load_url load_state_dict th_load exists load_url ResNet load_state_dict load_url ResNet load_state_dict array int list map pad_image_to_shape BORDER_CONSTANT get_2dshape randint get_2dshape zeros uint32 get_2dshape copyMakeBorder list map float resize int choice INTER_CUBIC resize INTER_LINEAR resize choice flip getRotationMatrix2D warpAffine random GaussianBlur choice randint Number isinstance astype float32 min max int uniform GaussianBlur reszie INTER_CUBIC resize INTER_NEAREST INTER_LINEAR shape pad zeros abs range setFormatter getLogger addHandler formatter StreamHandler ensure_dir setLevel INFO FileHandler requires_grad isinstance Conv2d parameters modules BatchNorm2d named_modules isinstance conv_init bias weight constant_ __init_weight isinstance isinstance Conv2d parameters modules Linear load items time list format join isinstance set OrderedDict warning load_state_dict info keys int list format join endswith device_count info append range split remove format system makedirs embed insert TrainPre batch_size target_size image_mean DataLoader niters_per_epoch image_std dataset use_gauss_blur int exp arange unsqueeze repeat zeros size positionalencoding2d repeat size positionalencoding2d cat repeat size positionalencoding2d repeat
# Displacement_Field Official implementation of paper **Predicting Sharp and Accurate Occlusion Boundaries in Monocular Depth Estimation Using Displacement Fields**(CVPR 2020) [paper link](https://arxiv.org/abs/2002.12730) NYUv2OC++ dataset(only for test use) [download link](https://drive.google.com/file/d/1Fk8uuH3oJJhyCN-4ffD3mdtCq2l4geJc/view) ## Visualization ### 1D example ![1D](./figure/toy.png) ------ ### 2D example on blurry depth image(prediction of depth estimator) ![2D](./figure/displacement_field.png) ------
1,964
durandtibo/weldon.resnet.pytorch
['multiple instance learning']
['WELDON: Weakly Supervised Learning of Deep Convolutional Neural Networks']
weldon/weldon_resnet.py weldon/__init__.py weldon/weldon.py WeldonPool2dFunction WeldonPool2d resnet18_weldon resnet152_weldon resnet101_weldon ResNetWSL resnet50_weldon demo resnet34_weldon resnet18 WeldonPool2d resnet34 WeldonPool2d resnet50 WeldonPool2d resnet101 WeldonPool2d resnet152 WeldonPool2d criterion backward Variable ones print resnet50_weldon forward long CrossEntropyLoss
# weldon.resnet.pytorch ``` @inproceedings{Durand_WELDON_CVPR_2016, author = {Durand, Thibaut and Thome, Nicolas and Cord, Matthieu}, title = {{WELDON: Weakly Supervised Learning of Deep Convolutional Neural Networks}}, booktitle = {The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)}, year = {2016} } ```
1,965
dustalov/watset
['word embeddings', 'word sense induction']
['Watset: Automatic Induction of Synsets from a Graph of Synonyms']
similarities.py impl/eco/discover.py eval/pairwise.py eval/cnl.py impl/cpm/cpm.py impl/watset/disambiguate.py scores evaluate words wordwise significance synonyms pairwise big small prob exact walk count emit set precision_recall_fscore_support float enumerate precision_recall_fscore_support ravel next tee pairwise pop count union product count items print Counter transform most_common
# Watset: Automatic Induction of Synsets from a Graph of Synonyms Watset is a local-global meta-algorithm for [fuzzy graph clustering](https://en.wikipedia.org/wiki/Fuzzy_clustering). The algorithm constructs an intermediate representation, called a *sense graph*, using a *local* graph clustering algorithm and then obtains overlapping node clusters using a *global* graph clustering algorithm. Originally, Watset was designed for addressing the synset induction problem, which is indicated in the corresponding [ACL&nbsp;2017](https://doi.org/10.18653/v1/P17-1145) paper. Despite its simplicity, Watset shows [excellent results](https://github.com/dustalov/watset/releases), outperforming five competitive state-of-the-art methods in terms of F-score on four gold standard datasets for English and Russian derived from large-scale manually constructed lexical resources. ## Important We found that Watset works very well not just for synset induction, but for many other fuzzy clustering tasks, too. Please use a much faster and convenient implementation of Watset in Java: <https://github.com/nlpub/watset-java>. ## Citation * [Ustalov, D.](https://github.com/dustalov), [Panchenko, A.](https://github.com/alexanderpanchenko), Biemann, C., Ponzetto, S.P.: [Watset: Local-Global Graph Clustering with Applications in Sense and Frame Induction](https://doi.org/10.1162/COLI_a_00354). Computational Linguistics 45(3) (2019) ```latex @article{Ustalov:19:cl, author = {Ustalov, Dmitry and Panchenko, Alexander and Biemann, Chris and Ponzetto, Simone Paolo},
1,966
duytinvo/acl2016
['sentiment analysis']
["Don't Count, Predict! An Automatic Approach to Learning Sentiment Lexicons for Short Text"]
learn_lexicon/scripts/lexicon-arabic.py test_lexicon/scripts/AraTweet.py test_lexicon/scripts/features.py test_lexicon/scripts/liblinear.py test_lexicon/scripts/save_lexicons.py learn_lexicon/scripts/process.py learn_lexicon/scripts/lexicon-english.py test_lexicon/scripts/liblinear_ar.py test_lexicon/scripts/unsupervise.py test_lexicon/scripts/features_ar.py learn_lexicon/scripts/twtokenize.py tokenizeRawTweetText simpleTokenize addAllnonempty splitToken squeezeWhitespace splitEdgePunct regex_or tokenize normalizeTextForTagger wlexicon readinfo load_sowe sub addAllnonempty len splitEdgePunct append range finditer split append strip search replace unescape tokenize normalizeTextForTagger load readinfo items sorted
# acl2016 This code is used for the paper "Don't Count, Predict! An Automatic Approach to Learning Sentiment Lexicons for Short Text" (ACL2016-short paper) This repository consists of three folders: - learn_lexicon: scripts to learn lexicons - test_lexicon: scripts to test ours learned lexicons - lexicons: sentiment lexicons in English and Arabic, which are learned by our models. To use our lexicons: - English and Arabic lexicons in "lexicons" folder. - Data format: word + '\t' + sentiment score + '\n'
1,967
dvl-tum/defocus-net
['depth estimation']
['Focus on defocus: bridging the synthetic to real domain gap for depth estimation']
source/arch/dofNet_arch1.py source/util_func.py source/arch/dofNet_arch2.py source/file_io.py source/train.py source/run_training.py read_pfm read_img _get_next_line read_depth read_lightfield write_hdf5 write_pfm read_parameters read_disparity train_model run_exp forward_pass my_config Visualization load_model compute_ssim compute_pearson save_config ToTensor _abs_val read_dpt compute_all_metrics ImageDataset set_comp_device compute_psnr load_data weights_init set_output_folders compute_loss CameraLens AENet RecurrentAE RecurrentBlock join sorted read_img read_parameters zeros enumerate dict join read_pfm join read_pfm imread iteritems File close create_dataset asarray byteorder print flatten flipud decode rstrip startswith zeros log_viz_plot zero_grad save log_viz_img str ones Adam MSELoss to range state_dict format forward_pass enumerate criterion backward print initial_viz randint step load str update Visualization train_model load_model print zfill set_comp_device parameters load_data set_output_folders load_state_dict to state_dict fromstring channels InputFile fill_ weight xavier_normal str list int print Subset ImageDataset DataLoader range len load str list print apply parameters import_module load_state_dict sum AENet len device mkdir zfill mean sum compare_ssim sum pearsonr argwhere delete compute_ssim compute_pearson transpose mean compute_psnr sum clip str zfill
# defocus-net Official PyTorch implementation of [Focus on Defocus: Bridging the Synthetic to Real Domain Gap for Depth Estimation](https://openaccess.thecvf.com/content_CVPR_2020/html/Maximov_Focus_on_Defocus_Bridging_the_Synthetic_to_Real_Domain_Gap_CVPR_2020_paper.html) paper published at Conference on Computer Vision and Pattern Recognition (CVPR) 2020. ## Installation Please download the code: To use our code, first download the repository: ```` git clone https://github.com/dvl-tum/defocus-net.git ```` To install the dependencies: ````
1,968
dykang/PASTEL
['experimental design', 'style transfer']
['(Male, Bachelor) and (Female, Ph.D) have different connotations: Parallelly Annotated Stylistic Language Dataset with Multiple Personas']
code/StyleClassify/feature_extract.py code/StyleTransfer/computeNLGEvalMetrics.py code/StyleTransfer/solver.py code/StyleClassify/classify.py code/StyleClassify/utils.py code/StyleTransfer/glove/constructEmbeddingDump.py code/StyleTransfer/utils/readData.py code/StyleTransfer/utils/__init__.py code/StyleTransfer/models/modules.py code/StyleTransfer/models/SeqToSeqAttn.py code/StyleTransfer/findDeleteLexicon.py code/StyleTransfer/models/torch_utils.py code/StyleTransfer/main.py code/StyleTransfer/models/embeddingUtils.py code/StyleTransfer/utils/utilities.py code/examples/load_dataset.py code/StyleTransfer/models/__init__.py main aggregate_data read_dataset write_dataset read_class_names cross_feature_joint read_feature_names get_data main classify extract_feature read_features add_features extract_features_combined_persona get_feature_id addFeatureToDict load_dataset save_features_to_file main get_lexical_features extract_feature_from_sentence extract_features_controlled_persona get_dic import_embeddings loadEmbedsAsNumpyObj maskSeq padSeq splitBatches reverseDict Lang read_corpus Lang read_corpus reverseDict maskSeq padSeq loadEmbedsAsNumpyObj splitBatches Lang read_corpus items join defaultdict print tuple len keys enumerate join format glob print tuple append len join format print makedirs zip len print read_dataset aggregate_data toarray load_svmlight_file scale train_test_split array get_data open sorted read_feature_names Counter shape append precision_recall_fscore_support sum range cross_val_score predict replace close DummyClassifier shuffle startswith zip enumerate join read_class_names print fit write len join list defaultdict print sort len write keys enumerate open int sorted glob cross_feature_joint exit write close average open zip append classify range len dict len print len vocabulary_ CountVectorizer fit str sorted addFeatureToDict save_features_to_file keys range average nlp ents sum array len print exit average append extract_feature_from_sentence enumerate join items extract_feature str print makedirs exit len index write get_feature_id close zip enumerate open join items defaultdict print tuple len keys makedirs join format glob print append len items join defaultdict print tuple len keys enumerate add_features extract_features_combined_persona import_embeddings load_dataset get_lexical_features extract_features_controlled_persona get_dic print strip write close load_word2vec_format open array split open array split append max array len randint len items defaultdict len split append open strip
# PASTEL Data and code for ["(Male, Bachelor) and (Female, Ph.D) have different connotations: Parallelly Annotated Stylistic Language Dataset with Multiple Personas"](https://arxiv.org/abs/1909.00098) by Dongyeop Kang, Varun Gangal, and Eduard Hovy, EMNLP 2019 ## Notes: - (Oct 2019) we have added the **version 2.0 (v2)** of our dataset in [data/data_v2.zip](https://github.com/dykang/PASTEL/blob/master/data/data_v2.zip): **39,778 sentences** and **7,933 stories**. In v2, we filtered out noisy example patterns that were not filtered out in the current version of the dataset. In detail, 1,772 sentences (~4.2%) out of 41,550 sentences are filtered out, and 377 stories (~4.5%) out of 8,310 stories are filtered out. - (Sep 2019) we have added a new experimental result using BERT on style classification. ## The PASTEL dataset PASTEL is a parallelly annotated stylistic language dataset. The dataset consists of ~41K parallel sentences and 8.3K parallel stories annotated across different personas. #### Examples in PASTEL: <img src="dataset.png" width="70%">
1,969
dynamicslab/langevin-regression
['sparse learning']
['Sparse learning of stochastic dynamic equations']
fpsolve.py .ipynb_checkpoints/utils-checkpoint.py dwutils.py utils.py .ipynb_checkpoints/dwutils-checkpoint.py switched_states model_eval fit_pdf dwell_stats langevin_regression dwell_times AdjFP SteadyFP KM_avg autocorr_func_1d sindy_model SSR_loop cost next_pow_two markov_test AFP_opt ntrapz kl_divergence switched_states model_eval fit_pdf dwell_stats langevin_regression dwell_times KM_avg autocorr_func_1d sindy_model SSR_loop cost next_pow_two markov_test AFP_opt ntrapz kl_divergence sign zeros len append len switched_states dwell_times int arange polyfit curve_fit mean sqrt zeros range len AdjFP KM_avg lambdify SteadyFP cost flatten lamb_expr nansum AFP_opt symbols zeros array range len int print fit_pdf dwell_stats run_nf langevin_regression sqrt run_sim linspace kl_divergence flatten min max copy mean shape sqrt nan zeros std range len iscomplex time format minimize print concatenate fun format opt_fun print delete copy zeros array range len sum max reshape solve precompute_operator abs kl_divergence T histogram2d copy histogramdd histogram linspace range einsum fft next_pow_two atleast_1d mean real len
# Nonlinear stochastic modeling with Langevin regression ___________ __J. L. Callaham, J.-C. Loiseau, G. Rigas, and S. L. Brunton (2020)__ Code and details for the manuscript on data-driven stochastic modeling with Langevin regression. The repository should have everything needed to reproduce the results of the systems in the paper and demonstrate the basics of Langevin regression. The main ideas are: 1. Estimating drift and diffusion from data with Kramers-Moyal averaging 2. Correcting finite-time sampling effects with the adjoint Fokker-Planck equation 3. Enforcing consistency with the empirical PDF via the steady-state Fokker-Planck equation The full optimization problem combines all of these, along with a sparsification routine called SSR that was [previously proposed](https://arxiv.org/abs/1712.02432) to extend [SINDy](https://github.com/dynamicslab/pysindy) to stochastic systems. The repository several Python packages: * `utils.py`: A number of functions to do the main work of Langevin regression. There is code to compute the Kramers-Moyal average, the Langevin regression "cost function", a wrapper around the Nelder-Mead optimization, an implementation of SSR, etc.
1,970
dynamicslab/modified-SINDy
['model discovery', 'denoising', 'time series']
['Automatic Differentiation to Simultaneously Identify Nonlinear Dynamics and Extract Noise Probability Distributions from Data']
VanderPol/ComparisonWithSINDy/utils_NSS_SINDy.py Duffing/NSS_SINDy_Approach_SingleRun_Duffing.py Lorenz/ComparisonWithSINDy/utils_NSS_SINDy.py Lorenz/NeuralNetworkApproach/utils_NSS.py Lotka-Volterra/utils_NSS_SINDy.py ComparisonWeakSINDy/Result/PlotResult.py ComparisonNN/EffectOfDataLength/utils_NSS_SINDy.py ComparisonNN/EffectOfDataLength/utils_NSS.py Lorenz96/utils_NSS_SINDy.py Duffing/SINDy_SingleRun.py Rossler/NSS_SINDy_Approach_SingleRun_Rossler.py Lorenz/NeuralNetworkApproach/NSS_NN_Approach_SingleRun_Lorenz.py Lorenz96/ComparisonWithSINDy/utils_NSS_SINDy.py Lorenz/utils_NSS_SINDy.py Rossler/ComparisonWithSINDy/SINDy_Swipe_No_Denoise.py Lorenz/SINDy_SingleRun.py VanderPol/SINDy_SingleRun.py ComparisonNN/EffectOfNoise/NSS_SINDy_SwipeNoiseLevel_Lorenz.py DiscrepancyModeling/utils_NSS_SINDy.py ComparisonNN/EffectOfDataLength/NSS_NN_SwipeDataLength.py Lorenz/ComparisonWithSINDy/SINDy_Swipe _Simple_Denoise.py Lotka-Volterra/NSS_SINDy_Approach_SingleRun_Lotka.py Rossler/utils_NSS_SINDy.py Duffing/utils_NSS_SINDy.py Rossler/ComparisonWithSINDy/SINDy_Swipe_Simple_Denoise.py Lorenz/ComparisonWithSINDy/SINDy_Swipe_No_Denoise.py CubicOscillator/SINDy_SingleRun.py VanderPol/NSS_SINDy_Approach_SingleRun_VanderPol.py Rossler/ComparisonWithSINDy/utils_NSS_SINDy.py VanderPol/utils_NSS_SINDy.py VanderPol/ComparisonWithSINDy/SINDy_Swipe_No_Denosing.py ComparisonNN/EffectOfDataLength/NSS_SINDy_SwipeDataLength.py Lorenz96/ComparisonWithSINDy/SINDy_Swipe _Simple_Denoised.py ComparisonNN/EffectOfNoise/utils_NSS_SINDy.py ComparisonNN/EffectOfQ/NSS_SINDy_SwipeQ.py Rossler/SINDy_SingleRun.py IdentifyNoiseDistribution/NSS_SINDy_Approach_SingleRun_VanderPo_DifferentNoisel.py Lorenz/NSS_SINDy_Approach_SingleRun_Lorenz.py CubicOscillator/utils_NSS_SINDy.py IdentifyNoiseDistribution/utils_NSS_SINDy.py ComparisonNN/EffectOfLambda/utils_NSS_SINDy.py Lorenz96/SINDy_SingleRun.py ComparisonNN/EffectOfNoise/NSS_NN_SwipeNoiseLevel_Lorenz.py Lorenz96/NSS_SINDy_Approach_SingleRun_Lorenz96.py CubicOscillator/NSS_SINDy_Approach_SingleRun_CubicOscillator.py Lorenz96/ComparisonWithSINDy/SINDy_Swipe_No_Denosing.py ComparisonNN/EffectOfLambda/NSS_SINDy_SwipeLambda.py VanderPol/ComparisonWithSINDy/SINDy_Swipe_Simple_Denoise.py ComparisonNN/EffectOfNoise/utils_NSS.py ComparisonNN/EffectOfQ/utils_NSS_SINDy.py IdentifyNoiseDistribution/NSS_SINDy_Approach_SingleRun_VanderPol_IterativeLearnGamma.py DiscrepancyModeling/NSS_SINDy_Discrepancy_Lorenz.py RK45_B Train_NSS_NN VanderPol Gaussian CubicOsc SliceNoise ID_Accuracy_NN CalDerivativeMatrix CheckGPU DecayFactor Lorenz GetInitialCondition approximate_noise CalDerivative Prediction WeightMSE SliceData OneStepLoss_NSS_NN RK45_F VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy RK45_B Train_NSS_NN VanderPol Gaussian CubicOsc SliceNoise ID_Accuracy_NN CalDerivativeMatrix CheckGPU DecayFactor Lorenz GetInitialCondition approximate_noise CalDerivative Prediction WeightMSE SliceData OneStepLoss_NSS_NN RK45_F VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy ChangeFontSize CustomizeViolin VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix LorenzDiscrepancy Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy ChangeFontSize VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy RK45_B Train_NSS_NN VanderPol Gaussian CubicOsc SliceNoise ID_Accuracy_NN CalDerivativeMatrix CheckGPU DecayFactor Lorenz GetInitialCondition approximate_noise CalDerivative Prediction WeightMSE SliceData OneStepLoss_NSS_NN RK45_F VanderPol Rossler Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero Lorenz96 OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Rossler Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero Lorenz96 OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Rossler Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Rossler Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy VanderPol Lotka Duffing ID_Accuracy_SINDy Gaussian CubicOsc SliceNoise CalDerivativeMatrix Prediction_SINDy CheckGPU DecayFactor SINDy Lorenz GetInitialCondition CalDerivative approximate_noise Lib solve_minnonzero OneStepLoss_NSS_SINDy LibGPU WeightMSE RK45_F_SINDy SliceData Train_NSS_SINDy NSS_SINDy RK45_B_SINDy array array array zeros range shape print is_gpu_available constant f add append range slice concat range concat range RK45_F RK45_B append range constant add_n multiply reduce_mean add squared_difference trainable_variables gradient apply_gradients zip append OneStepLoss_NSS_NN time print range norm constant model append numpy range dot shape vstack zeros range array array print shape range concatenate gather concat T solve qr lstsq conj norm solve_minnonzero print shape zeros range add constant matmul LibGPU concat range RK45_F_SINDy RK45_B_SINDy apply_gradients gradient zip print OneStepLoss_NSS_SINDy time range Lib time constant str print multiply Variable astype float32 SINDy Train_NSS_SINDy range CalDerivative norm constant LibGPU matmul append numpy range rc percentile arange plot len array array zeros range shape ones ones_like shape range
dynamicslab/modified-SINDy
1,971
dynamicslab/pysindy
['model discovery']
['PySINDy: A comprehensive Python package for robust sparse system identification']
test/utils/test_odes.py pysindy/differentiation/sindy_derivative.py pysindy/optimizers/frols.py test/property_tests/test_optimizers_complexity.py pysindy/__init__.py pysindy/differentiation/smoothed_finite_difference.py pysindy/optimizers/sindy_pi.py pysindy/deeptime/__init__.py pysindy/feature_library/identity_library.py docs/Youtube/generate_data.py test/optimizers/test_optimizers.py pysindy/optimizers/sindy_optimizer.py pysindy/utils/odes.py test/differentiation/test_differentiation_methods.py docs/conf.py pysindy/feature_library/pde_library.py pysindy/differentiation/finite_difference.py pysindy/feature_library/base.py pysindy/feature_library/custom_library.py pysindy/optimizers/__init__.py examples/data/vonKarman_pod/neksuite.py pysindy/feature_library/fourier_library.py pysindy/differentiation/spectral_derivative.py pysindy/differentiation/base.py pysindy/optimizers/base.py pysindy/optimizers/trapping_sr3.py pysindy/feature_library/__init__.py pysindy/pysindy.py test/test_sindyc.py pysindy/feature_library/polynomial_library.py test/test_pysindy.py pysindy/optimizers/sr3.py test/conftest.py pysindy/differentiation/__init__.py pysindy/feature_library/generalized_library.py pysindy/deeptime/deeptime.py pysindy/utils/__init__.py pysindy/optimizers/ssr.py test/feature_library/test_feature_library.py test/utils/test_utils.py test/deeptime/test_scikit_time.py setup.py pysindy/feature_library/weak_pde_library.py pysindy/optimizers/constrained_sr3.py pysindy/feature_library/sindy_pi_library.py pysindy/optimizers/stlsq.py pysindy/utils/base.py setup parse_class_attributes_section parse_attributes_section patched_parse parse_keys_section f exadata datalims elem readnek SINDy SINDyEstimator SINDyModel BaseDifferentiation FiniteDifference SINDyDerivative SmoothedFiniteDifference SpectralDerivative TensoredLibrary ConcatLibrary BaseFeatureLibrary CustomLibrary FourierLibrary GeneralizedLibrary IdentityLibrary PDELibrary PolynomialLibrary SINDyPILibrary WeakPDELibrary ComplexityMixin _MultiTargetLinearRegressor BaseOptimizer _rescale_data ConstrainedSR3 FROLS SINDyOptimizer SINDyPI SR3 SSR STLSQ TrappingSR3 validate_control_variables prox_l1 prox_cad reorder_constraints convert_u_dot_integral drop_random_rows prox_weighted_l2 get_regularization drop_nan_rows get_prox supports_multiple_targets prox_weighted_l1 capped_simplex_projection print_model equations prox_weighted_l0 _check_control_shape prox_l2 prox_l0 validate_input f_acc yeast f_steer logistic_map_multicontrol burgers_galerkin lorenz_u kinematic_commonroad logistic_map lotka lorenz_control mhd meanfield lorenz oscillator double_pendulum duffing linear_damped_SHO rossler van_der_pol cubic_damped_SHO bacterial pendulum_on_cart linear_3D enzyme hopf cubic_oscillator logistic_map_control diffuse_multiple_trajectories data_discrete_time data_2d_random_pde data_discrete_time_multiple_trajectories data_discrete_time_multiple_trajectories_c data_discrete_time_c_multivariable data_discrete_time_c data_lorenz_c_2d data_lorenz data_1d_random_pde data_derivative_quasiperiodic_2d data_sindypi_library data_5d_random_pde data_custom_library data_3d_random_pde data_lorenz_c_1d data_1d data_quadratic_library data_derivative_quasiperiodic_1d data_generalized_library data_2dspatial data_custom_library_bias data_derivative_2d data_pde_library data_multiple_trajctories data_derivative_1d data_1d_bad_shape data_linear_oscillator_corrupted data_ode_library data_2d_resolved_pde data_linear_combination test_fit_warn test_linear_constraints test_bad_ensemble_params test_predict_discrete_time_multiple_trajectories test_simulate_errors test_simulate_discrete_time test_ensemble test_fit_discrete_time_multiple_trajectories test_predict test_bad_ensemble_weakform test_library_ensemble_weak_pde test_integration_derivative_methods test_score test_both_ensemble test_libraries test_predict_discrete_time test_score_discrete_time test_data_shapes test_fit_discrete_time test_simulate test_multiple_trajectories_and_ensemble test_library_ensemble_pde test_score_multiple_trajectories test_library_ensemble test_print_discrete_time_multiple_trajectories test_cross_validation test_differentiate test_both_ensemble_pde test_integration_smoothed_finite_difference test_both_ensemble_weak_pde test_fit_multiple_trajectores test_score_discrete_time_multiple_trajectories test_multiple_trajectories_errors test_mixed_inputs test_coefficients test_ensemble_pdes test_bad_t test_print_discrete_time test_t_default test_complexity test_get_feature_names_len test_not_fitted test_predict_multiple_trajectories test_nan_derivatives test_improper_shape_input test_ensemble_weak_pdes test_equations test_fit_warn test_predict_discrete_time_multiple_trajectories test_simulate_errors test_simulate_discrete_time test_fit_discrete_time_multiple_trajectories test_predict test_score test_simulate_with_vector_control_input test_predict_discrete_time test_score_discrete_time test_fit_discrete_time test_simulate test_score_multiple_trajectories test_fit_multiple_trajectores test_score_discrete_time_multiple_trajectories test_extra_u_warn_discrete test_mixed_inputs test_bad_t test_t_default test_get_feature_names_len test_not_fitted test_predict_multiple_trajectories test_bad_control_input test_simulate_with_interp test_u_omitted test_improper_shape_input test_extra_u_warn test_model_unfitted_library test_model_copy test_estimator_has_model test_estimator_fetch_model test_model_unfitted_optimizer test_model_has_sindy_methods test_model_sindy_equivalence test_bad_t_values test_forward_difference_2d test_forward_difference_1d test_spectral_derivative_1d test_smoothed_finite_difference test_centered_difference_xy_yx test_centered_difference_length test_centered_difference_hot test_centered_difference_hot_axis test_centered_difference_variable_timestep_length test_wrapper_equivalence_with_dxdt test_forward_difference_variable_timestep_length test_centered_difference_2d_uniform_time test_derivative_output_shape test_forward_difference_length test_centered_difference_noaxis_vs_axis test_centered_difference_2d_uniform test_centered_difference_2d_nonuniform_time test_finite_difference test_base_class test_centered_difference_1d test_centered_difference_2d test_order_error test_spectral_derivative_2d test_sindypi_library test_pde_library_bad_parameters test_sindypi_library_bad_params test_1D_weak_pdes test_2D_weak_pdes test_fourier_options test_3D_weak_pdes test_5D_pdes test_polynomial_options test_form_pde_library test_form_custom_library test_weak_pde_library_bad_parameters test_library_ensemble test_generalized_library_pde test_not_implemented test_generalized_library_bad_parameters test_5D_weak_pdes test_tensored test_polynomial_sparse_inputs test_generalized_library_weak_pde test_1D_pdes test_change_in_data_shape test_bad_parameters test_2D_pdes test_form_sindy_pi_library test_not_fitted test_generalized_library test_fit_transform test_bad_library_ensemble test_output_shape test_concat test_get_feature_names pde_library_helper test_3D_pdes data test_sample_weight_optimizers test_fit_warn test_optimizers_verbose_cvxpy test_ensemble_odes test_constrained_inequality_constraints test_constrained_sr3_quadratic_library test_target_format_constraints test_complexity_not_fitted DummyModelNoCoef test_constrained_sr3_prox_functions DummyEmptyModel test_sindypi_fit test_specific_bad_parameters test_sr3_disable_trimming test_sr3_quadratic_library test_trapping_sr3_quadratic_library test_initial_guess_sr3 DummyLinearModel test_sr3_enable_trimming test_sr3_trimming test_sr3_warn test_bad_optimizers test_prox_functions test_row_format_constraints test_inequality_constraints_reqs test_trapping_inequality_constraints test_sindypi_bad_parameters test_unbias_external test_alternate_parameters test_general_bad_parameters test_ensemble_pdes test_fit test_weighted_prox_functions test_optimizers_verbose test_not_fitted test_trapping_bad_parameters test_supports_multiple_targets test_sr3_bad_parameters test_normalize_columns test_unbias test_ssr_criteria test_cad_prox_function test_trapping_cubic_library test_complexity test_complexity_parameter galerkin_model test_odes test_galerkin_models test_reorder_constraints_1D test_reorder_constraints_2D add_css_file _parse_class_attributes_section _unpatched_parse _parse_keys_section int decode read list print exadata min close unpack open float max range split asarray dia_matrix sqrt safe_sparse_dot full ndarray isinstance reshape size check_array _check_control_shape vstack reshape size array spatial_grid num_trajectories product concatenate slice sort reshape ndim choice shape convert_u_dot_integral vstack append spatiotemporal_grid _set_up_grids range len flatten reshape range copy zeros T range shape bisect min max join filter strip get_feature_names coef_ ones intercept_ isscalar isinstance u_interp tuple trapezoid XT take grid_ndim K grid_pts zeros range RegularGridInterpolator u_fun T pi sqrt zeros array range u_fun reshape linspace linspace T linspace append T linspace zip solve_ivp arange reshape cos pi linspace logistic_map zeros range logistic_map range enumerate _differentiate linspace randn T randn _differentiate linspace meshgrid asarray randn transpose linspace _differentiate meshgrid asarray randn transpose linspace _differentiate meshgrid T randn _differentiate linspace meshgrid reshape linspace reshape arange pi sin ones zeros linspace arange cos pi sin zeros cos linspace sin meshgrid zeros reshape tile linspace linspace seed exp arange concatenate ones size choice stack linspace stack linspace u_fun T linspace u_fun T linspace zeros range logistic_map_control randn randn logistic_map_multicontrol zeros range column_stack logistic_map_control range enumerate fit SINDy SINDy flatten check_is_fitted fit SINDy check_is_fitted fit SINDy check_is_fitted fit SINDy SINDy differentiate score SINDy coefficients assert_almost_equal assert_allclose fit fit predict SINDy simulate fit ravel SINDy score fit SINDy check_is_fitted fit SINDy check_is_fitted fit SINDy fit SINDy check_is_fitted fit SINDy fit predict SINDy score fit SINDy check_is_fitted fit SINDy simulate fit SINDy fit SINDy fit SINDy check_is_fitted fit SINDy fit predict SINDy score fit SINDy print fit readouterr SINDy print fit readouterr SINDy print fit readouterr SINDy differentiate SINDy coefficients fit SINDy fit SINDy _process_multiple_trajectories SINDy fit SINDy SINDy fit check_is_fitted RandomizedSearchCV SINDy ones coefficients ConstrainedSR3 zeros array assert_allclose fit ones zeros ConstrainedSR3 fit PDELibrary fit meshgrid WeakPDELibrary T fit PolynomialLibrary fit PDELibrary fit T WeakPDELibrary meshgrid convert_u_dot_integral fit PolynomialLibrary fit PDELibrary fit T WeakPDELibrary meshgrid convert_u_dot_integral fit ones zeros ConstrainedSR3 fit T SINDy WeakPDELibrary linspace meshgrid zeros ones fit SINDy print transpose STLSQ SINDy WeakPDELibrary meshgrid coefficients PDELibrary fit ones_like SINDy simulate fit interp1d SINDy simulate fit SINDy print fit SINDy fit SINDy fit SINDy SINDyEstimator fit SINDyEstimator fit print n_features_in_ coefficients fetch_model assert_allclose fit fetch_model FourierLibrary fit STLSQ fit fetch_model copy FiniteDifference linspace FiniteDifference linspace FiniteDifference linspace FiniteDifference linspace FiniteDifference forward_difference assert_allclose FiniteDifference forward_difference assert_allclose FiniteDifference centered_difference assert_allclose _differentiate SpectralDerivative spectral_derivative assert_allclose FiniteDifference centered_difference assert_allclose _differentiate SpectralDerivative spectral_derivative assert_allclose FiniteDifference centered_difference assert_allclose FiniteDifference centered_difference linspace assert_allclose FiniteDifference centered_difference linspace assert_allclose zeros _differentiate assert_allclose shape spectral_deriv centered_difference _differentiate forward_difference linspace range assert_allclose FiniteDifference method assert_allclose SmoothedFiniteDifference smoothed_centered_difference SmoothedFiniteDifference assert_allclose dxdt reshape arange assert_allclose SINDyDerivative arange SINDyDerivative spectral_deriv reshape centered_difference _differentiate forward_difference linspace range assert_allclose reshape shape centered_difference _differentiate linspace zeros range assert_allclose CustomLibrary PDELibrary SINDyPILibrary check_is_fitted fit_transform fit fit_transform get_feature_names fit_transform check_is_fitted sparse_format fit_transform PolynomialLibrary check_is_fitted sparse_format fit_transform PolynomialLibrary FourierLibrary check_is_fitted fit_transform BaseFeatureLibrary PolynomialLibrary check_is_fitted IdentityLibrary fit_transform fit PolynomialLibrary check_is_fitted IdentityLibrary fit_transform fit transform n_output_features_ tolist get_feature_names FourierLibrary reshape STLSQ print PolynomialLibrary GeneralizedLibrary SINDy CustomLibrary tile fit get_feature_names FourierLibrary print STLSQ GeneralizedLibrary PolynomialLibrary SINDy PDELibrary fit T get_feature_names print STLSQ GeneralizedLibrary SINDy WeakPDELibrary meshgrid fit get_feature_names STLSQ fit SINDy len pde_library_helper PDELibrary pde_library_helper PDELibrary pde_library_helper PDELibrary pde_library_helper PDELibrary asarray randn transpose WeakPDELibrary linspace pde_library_helper meshgrid asarray randn transpose WeakPDELibrary linspace pde_library_helper meshgrid asarray randn transpose WeakPDELibrary linspace pde_library_helper meshgrid asarray randn transpose WeakPDELibrary linspace pde_library_helper meshgrid fit SINDyPILibrary SINDy SINDyPI check_is_fitted reshape SINDyOptimizer fit fit check_is_fitted reshape STLSQ fit ones shape check_is_fitted _differentiate optimizer fit T arange SINDyPI SINDy SINDyPILibrary fit standard_normal SINDy CustomLibrary check_is_fitted SR3 fit int standard_normal SINDy CustomLibrary ConstrainedSR3 check_is_fitted eye zeros fit seed update TrappingSR3 int standard_normal SINDy check_is_fitted eye zeros fit TrappingSR3 standard_normal SINDy CustomLibrary check_is_fitted fit reshape standard_normal fit check_is_fitted reshape optimizer fit check_is_fitted reshape fit SR3 ones reshape check_is_fitted ConstrainedSR3 fit check_is_fitted reshape ConstrainedSR3 fit reshape SINDyOptimizer STLSQ fit reshape SINDyOptimizer fit Lasso SINDyOptimizer trimming_array assert_array_equal array optimizer fit coef_ disable_trimming optimizer assert_allclose fit coef_ enable_trimming optimizer assert_allclose fit optimizer reshape ones zeros array optimizer assert_allclose fit ones zeros optimizer assert_allclose fit PolynomialLibrary SINDy ConstrainedSR3 check_is_fitted zeros array fit TrappingSR3 PolynomialLibrary SINDy check_is_fitted zeros array fit zeros array check_is_fitted reshape optimizer fit fit optimizer SINDy get_feature_names randn reshape SINDy shape _differentiate linspace zeros range optimizer len fit SSR SINDy check_is_fitted _differentiate optimizer fit check_is_fitted _differentiate optimizer fit seed reshape make_regression dict zip randint assume enumerate reshape make_regression zip assume fit T rand linspace T arange burgers_galerkin eig random argsort real assert_array_equal flatten arange array assert_array_equal reshape array reorder_constraints
dynamicslab/pysindy
1,972
dzhv/Spatio-Temporal-mobile-traffic-forecasting
['video prediction']
['PredRNN++: Towards A Resolution of the Deep-in-Time Dilemma in Spatiotemporal Predictive Learning']
tests/window_slider_tests.py experiments/model_factory.py models/model.py models/model_device_adapter.py data_providers/full_grid_data_provider.py experiments/mean_predictor_experiment.py data_providers/data_provider.py tests/seq2seq2_data_provider_tests.py tests/milano_grid_tests.py utilities/file_combiner.py experiments/arima_evaluator.py models/predrnn/predrnn_windowed.py tests/windowed_data_provider_tests.py experiments/storage_utils.py utilities/milano_grid.py models/cnn_convlstm_seq2seq.py models/predrnn/causal_lstm_cell.py models/keras_seq2seq.py experiments/experiment_builder.py models/convlstm_attention_cell.py experiments/arima_trainer.py experiments/experiment_runner.py tests/mock_data_reader.py models/keras_model.py models/mean_predictor.py utilities/result_scanner.py experiments/model_evaluator.py models/windowed_cnn_convlstm.py experiments/arg_extractor.py utilities/data_grid_mapping.py run_scripts/run_lstm_batch.py experiments/tf_lstm_experiment.py data_providers/seq2seq_data_provider.py models/mlp.py models/windowed_convlstm_seq2seq.py experiments/session_holder.py models/cnn_convlstm_attention.py models/losses.py models/lstm.py tests/full_grid_data_provider_tests.py models/cnn_lstm.py models/predrnn/gradient_highway_unit.py models/predrnn/tensor_layer_norm.py tests/mini_data_provider_tests_old.py data_providers/window_slider.py data_providers/windowed_data_provider.py data_providers/data_provider_factory.py models/predrnn/predrnn.py tests/grid_map_tests.py models/cnn_convlstm.py models/lstm_tf.py data_providers/data_reader.py models/convlstm_seq2seq.py DataProvider get_data_providers get_full_grid_data_providers get_windowed_data_providers get_seq2seq_data_providers DataReader FullDataReader MiniDataReader FullGridDataProvider Seq2SeqDataProvider WindowedDataProvider get_sequential_inputs_and_targets get_windowed_segmented_data sliding_window_view get_windowed_data str2int_list str2bool get_args make_prediction evaluate prediction_analysis calculate_error nrmse fullgrid_prediction_analysis predict_sequence grid_search train_and_save ExperimentBuilder get_prediction_save_path evaluate evaluate_inference_flops calculate_loss prediction_analysis get_essentials get_save_dir profile evaluate_memory how_much_is_missing report_multistep_error write_to_file iterate_prediction_batches get_model SessionHolder save_statistics load_statistics load_from_stats_pkl_file save_to_stats_pkl_file save_best_val_scores CnnConvLSTM CnnConvLSTMAttention CnnConvLSTMSeq2Seq CnnLSTM ConvLSTMAttentionCell ConvLSTMSeq2Seq KerasModel KerasSeq2Seq nrmse_keras mse nrmse_numpy LSTM LSTM MeanPredictor MLP Model get_device_specific_model WindowedCnnConvLSTM WindowedConvLSTMSeq2Seq CausalLSTMCell GHU try_outputs try_saving try_loading PredRNN rnn try_outputs try_saving try_loading PredRnnWindowed rnn tensor_layer_norm shape_test test_map_and_save assertions test_map shape_test number_of_samples_test MockIterativeDataReader MockDataReader test shape_test number_of_samples_test test shape_test number_of_samples_test find_segment get_sequential_inputs_and_targets_test get_windowed_segmented_data_test get_windowed_data_test map_month map map_december get_sorted_data print_times map_november map_and_save timestamp_string map_to_tensor combine_train combine_val combine_test map WindowedDataProvider Seq2SeqDataProvider FullGridDataProvider tuple array squeeze pad sliding_window_view reshape get_windowed_data reshape squeeze transpose shape moveaxis sliding_window_view T get_windowed_data reshape squeeze shape sliding_window_view str print add_argument gpu_id ArgumentParser parse_args mean sqrt squeeze square load time filter params SARIMAX get_prediction print zeros range predict_sequence make_prediction print calculate_error append range enumerate len print update predict_sequence save update print predict_sequence save zeros range enumerate time print initialize_approximate_diffuse SARIMAX mkdir save range fit range train_and_save get_save_dir join num_batches get_random_samples evaluation_steps get_essentials report_multistep_error write_to_file prediction_batch_size get_prediction_save_path output_size reshape squeeze transpose prediction_batch_size get_essentials shape enumerate_data iterate_prediction_batches enumerate grid_size load model_file print get_data_providers get_model list defaultdict write_to_file print calculate_loss set append iterate_prediction_batches print forward how_much_is_missing print len train_std train_mean RunMetadata print float_operation profile print time_and_memory profile join join join append strip enumerate split join ABCMeta mean sqrt square mean sqrt squeeze square squeeze print multi_gpu_model is_gpu_available as_list str transpose ghu stack reduce_mean append cslstm range squared_difference print train forward train save load train forward get_shape batch_normalization ndims moments get_variable print next print assertions map load map_and_save print assertions print list next len WindowedDataProvider next print MiniDataReader print array get_windowed_data all find_segment print array get_windowed_segmented_data print get_sequential_inputs_and_targets array groupby iterrows format square_id print map append zeros expand_dims empty timestamp_string len print dropna read_csv print size shape get_sorted_data map_to_tensor print map save int print format timestamp_string get_sorted_data print map_month print map_month map_and_save format system range load format print save range load format print save range load format print save range int
# Spatio Temporal Mobile Traffic Forecasting This is the source code of the Spatio Temporal Mobile Traffic Forecasting project done as a Master's dissertation project by Džiugas Vyšniauskas in the University of Edinburgh. The problem tackled here can be loosely stated as: How can one predict the upcoming mobile internet traffic in a city, given a sequence of city-wide (geographical) traffic measurements leading to the prediction moment? It turns out, that predicting city-wide mobile internet usage volume is similar to video prediction. Led by this idea, the following Deep Learning architectures were implemented and evaluated on Telecom Italia Big Data challenge data set (it looks as if the data set is no longer available in the original website, however it might be available from other sources): * Sequence to Sequence LSTM * Sequence to Sequence ConvLSTM (convolutional LSTM) * CNN-ConvLSTM (model combining convolutional and ConvLSTM layers) * CNN-ConvLSTM+Attention (CNN-ConvLSTM combined with an Attention mechanism) * PredRNN++ (an existing video prediction model: https://arxiv.org/abs/1804.06300)
1,973
e-hulten/maf
['density estimation']
['Masked Autoregressive Flow for Density Estimation']
train.py batch_norm_layer.py datasets/hepmass.py datasets/mnist.py utils/train.py made.py maf_layer.py test.py datasets/miniboone.py datasets/power.py utils/test.py utils/validation.py datasets/data_loaders.py utils/plot.py maf.py BatchNormLayer BatchNorm_running MADE MaskedLinear MAF MAFLayer get_data get_data_loaders HEPMassDataset load_data_no_discrete_normalised_as_array load_data_no_discrete load_data_no_discrete_normalised load_data load_data_normalised load_data MINIBOONE MNISTDataset PowerDataset load_data_split_with_noise load_data load_data_normalised plot_losses sample_digits_maf test_maf test_made train_one_epoch_maf train_one_epoch_made val_made val_maf lower from_numpy DataLoader x read_csv load_data drop mean std load_data_no_discrete int T Counter load_data_no_discrete_normalised append load int mean vstack load_data std int RandomState rand hstack shuffle delete load_data zeros load_data_split_with_noise permutation arange subplots set_yticklabels axis log_prob seed str set_frame_on view transpose normal_ imshow savefig range set_xticklabels close eval manual_seed backward set_axis_off subplots_adjust sigmoid eye MultivariateNormal zeros ravel makedirs str subplots set_xlim astype close set set_ylabel lineplot savefig legend set_ylim makedirs format print mean sqrt eval forward std len format print mean sqrt eval std len sum format backward print train step zero_grad mean float forward len sum exp format backward print train chunk step zero_grad mean float forward len sum format print tolist dataset extend sqrt eval float forward std len format print sqrt eval sum std len
# :christmas_tree: Masked Autoregressive Flow with PyTorch This is a PyTorch implementation of the masked autoregressive flow (MAF) by Papamakarios et al. [1]. The Gaussian MADE that makes up each layer in the MAF is found in ``MADE.py``, while the MAF itself is found in ``maf.py``. ## Datasets The files in the ``data`` folder are adapted from the original repository by G. Papamakarios [2]. G. Papamakarios et al. have kindly made the preprocessed datasets available to the public, and they can be downloaded through this link: https://zenodo.org/record/1161203#.Wmtf_XVl8eN. ## Example Remember to download the datasets first, and then run ``` python3 train.py ```
1,974
e-mois/nstbot
['style transfer']
['A Neural Algorithm of Artistic Style']
menu.py run.py model_slow.py utils_slow.py config.py handlers.py utils.py main.py model.py Bottleneck ConvLayer Net UpBottleneck UpsampleConvLayer GramMatrix Inspiration Normalization StyleLoss VGG gram_matrix ContentLoss Run preprocess_batch transfer_style tensor_load_rgbimage tensor_save_rgbimage tensor_save_bgrimage preproc_img transfer_style_slow get_style_model_and_losses get_model run_style_transfer get_input_optimizer t reshape size mm State int ANTIALIAS transpose convert resize float fromarray numpy astype save chunk tensor_save_rgbimage cat transpose chunk cat load items list endswith style_model preprocess_batch copy setTarget unsqueeze load_state_dict tensor_save_bgrimage deepcopy children format isinstance Sequential Normalization MaxPool2d add_module Conv2d StyleLoss len ReLU ContentLoss BatchNorm2d range append detach LBFGS get_style_model_and_losses clamp_ step get_input_optimizer unsqueeze open load parameters VGG load_state_dict preproc_img clone run_style_transfer save_image
# Neyral Style Transfer Bot for Telegram В данном репозитории находится код бота, работающего по принципу приложения Prisma. Сначала необходимо прислать свое фото, которое требуется изменить, затем либо выбрать стиль из предложенных, либо прислать фото на в качестве фотографии стиля. Желательно, чтобы это были какие-то цветные орнаменты или росписи. Но в этом случае придется подождать. Бот в Telegram @em_transfer_style_bot В боте используется два способа Transer Style: 1. При отправке своего фото в качестве стиля используется медленный алгоритм по статье <https://arxiv.org/abs/1508.06576> Леона А. Гатиса, Александра С. Эккера и Маттиаса Бетге. <https://pytorch.org/tutorials/beginner/transfer_learning_tutorial.html> <img src="pic/content.jpg" width="200"/> <img src="pic/style1.jpg" width="200"/> <img src="pic/res1.jpg" width="200"/> 2. При выборе предложенного стиля используется алгоритм на основе предобученной MSG-Net <https://github.com/zhanghang1989/PyTorch-Multi-Style-Transfer> <img src="pic/content.jpg" width="200"/> <img src="pic/style2.jpg" width="200"/> <img src="pic/res2.jpg" width="200"/> Развернуть бота на локальной машине или сервере можно двумя способами:
1,975
eXascaleInfolab/2018-RecovDB
['time series analysis', 'time series']
['RecovDB: accurate and efficient missing blocks recovery for large time series']
recovery/src/recovery.py decomp/src/centroid.py recovery/src/main.py decomp/src/cd_ssv.py SSV_init CD LSV SSV ZCD MAD SSV_init recovery nan_helper SSV CD LSV rmse linear_interpolated_base_series_values zcd_recovery ones norm range reshape transpose argmin dot LSV ones reshape argmin dot norm SSV_init transpose SSV dot zeros range norm transpose dot zeros range ZCD transpose copy dot zeros isnan range nan index0 time nan_helper index1 copy CD NaN zcd_recovery linear_interpolated_base_series_values range
# RecovDB: Recovery of missing values inside MonetDB ## Prerequisities - Clone this repository - Enter the cloned repo and run the following commands ___ ## UDF Configuration ### Ubuntu/Debian ``` bash $ sh monetdb_install.sh $ sh createdb.sh
1,976
easternCar/Face-Parsing-Network
['semantic parsing', 'facial inpainting']
['Generative Face Completion']
utils/logger.py seg_trainer.py utils/dataset.py utils/tools.py seg_inference.py seg_train.py utils/test_dataset.py utils/loss.py network_seg_contour.py Parser dis_conv Conv2dBlock gen_conv main main Seg_Trainer Parse_Dataset get_logger date_uid CrossEntropy2d CrossEntropyLoss2d Test_Dataset is_image_file get_parsing_labels encode_segmap flow_to_image local_patch compute_color make_color_wheel test_bbox2mask get_model_list pt_highlight_flow mask_image same_padding reduce_sum decode_segmap normalize get_config bbox2mask highlight_flow default_loader test_random_bbox random_bbox pil_loader pt_compute_color spatial_discounting_mask extract_image_patches pt_flow_to_image reduce_std reduce_mean pt_make_color_wheel tensor_img_to_npimg deprocess config imwrite Parser DataLoader DataParallel argmax cuda seed list get_model_list len decode_segmap load_state_dict iter samples parse_args next range imsave manual_seed_all format get_config manual_seed Test_Dataset load join int print netG randint numpy makedirs save_model zero_grad Parse_Dataset basename Seg_Trainer get_logger module SummaryWriter trainer param_groups copy mean info backward netParser step stdout join setFormatter getLogger addHandler StreamHandler Formatter setLevel date_uid INFO FileHandler transpose numpy squeeze int size max unfold size Unfold same_padding append randint range random_bbox zeros size range randint random_bbox bbox2mask append enumerate bbox2mask is_cuda interpolate cuda ones min cuda tensor expand_dims max range list sorted mean shape range len list sorted shape std range len list sorted shape sum range len eps min sqrt append compute_color max range max eps min int64 is_available tensor to cuda range append pt_compute_color ones shape range append ones shape range append uint8 arctan2 size astype pi logical_not isnan shape sqrt floor zeros make_color_wheel range float32 pi atan2 shape sqrt pt_make_color_wheel int64 is_available zeros to cuda range zeros transpose floor arange zeros arange lower div_ zeros astype get_parsing_labels enumerate zeros get_parsing_labels range copy sort
# Face-Parsing-Network PyTorch implementation of Face Parsing (based on semantic segmentation) Network originally based on : [Object contour detection with a fully convolutional encoder-decoder network [J. Yang, 2016]](http://openaccess.thecvf.com/content_cvpr_2016/papers/Yang_Object_Contour_Detection_CVPR_2016_paper.pdf) Used for : [Generative Face Completion [Y. Li, 2017]](https://arxiv.org/abs/1704.05838) Used Dataset : [CelebA-HQ Dataset](https://github.com/switchablenorms/CelebAMask-HQ) The network layer codes(like batch normalization, convolution...) was refer to [Context Attention](https://github.com/DAA233/generative-inpainting-pytorch) -------------------------
1,977
eatsleepraverepeat/reMUDE
['sentiment analysis']
['Combating Adversarial Misspellings with Robust Word Recognition']
correction-example.py train.py src/vectorizer.py src/dataset.py control.py utils/text.py utils/metrics.py src/model.py utils/qwerty_layout.py pred_pretty_printer best_checkpoint_selector re_tokenizer islatin isnum process_record create_trainer get_data_loaders test create_evaluator prepare_batch valid_evaluate SPCInMemDataset pad_token_sequence pad_char_sequence pad_mask_sequence custom_collate_fn MUDE TransformerEncoder Vectorizer WordRecognitionAccuracy text_normalizer append print enumerate argmax compile text_normalizer join insert text re_tokenizer any append sentenize DataLoader cpu_count SPCInMemDataset to list items Engine attach print epoch round run print round run max int view pad_token_sequence pad_char_sequence argsort long pad_mask_sequence append array enumerate len items fix_text list replace group search unidecode sub finditer compile
# (re)MUDE ### (re)Implementation of [Learning Multi-level Dependencies for Robust Word Recognition](https://arxiv.org/pdf/1911.09789.pdf) # Summary The original paper introduce a robust word recognition framework that captures multi-level sequential dependencies in noised sentence. Practical application of such framework addresses to a challenging task of [Grammatical Error Correction](https://en.wikipedia.org/wiki/Grammar_checker) and [improving robustness of modern NLP setups](https://arxiv.org/abs/1905.11268). Model architecture: <p align='center'><img src="https://i.ibb.co/2jK20VW/mude-arc.png" alt="mude-arc" border="5"></a> # Why Despite a clearly written paper the released [original code](https://github.com/zw-s-github/MUDE) lacks of structure, guidance and reproducibility. There are also critical bugs found by community members in original implementation. Here's my attempt to organize bits and pieces in intuitive way. # Details It's a fully [Pytorch](https://github.com/pytorch/) based implementation, using `torch.nn.TransformerEncoder`, `torch.nn.data.Dataset`, `torch.nn.data.Dataloader` and blazing [Ignite](https://github.com/pytorch/ignite) for personal and your convinience.
1,978
ebekkers/gsplinets
['face alignment']
['B-Spline CNNs on Lie Groups']
experiments/PCAM/pcam.py gsplinets_tf/bsplines.py experiments/PCAM/train.py gsplinets_tf/group/SE2.py experiments/CelebA/models/CelebALandmarks_FixedScale_augm.py experiments/PCAM/run_experiments.py experiments/CelebA/run_experiments.py experiments/PCAM/models/PCAM_SE2.py experiments/CelebA/models/CelebALandmarks_FixedScale.py experiments/PCAM/models/PCAM_SE2_norotaugm.py gsplinets_tf/group/R2R+.py experiments/CelebA/models/CelebALandmarks_Scaling.py gsplinets_tf/__init__.py gsplinets_tf/layers.py experiments/CelebA/CelebA.py experiments/CelebA/train.py _load_dataset get_celebanoses_data _load_H5 read_parameter_file overwrite_parameter_file str2bool validate create_result_dir train train_arg_parser train_one_epoch get_model get_available_gpus blur2d argmax2d CelebALandmarks_FixedScale heatmap2weightmap gaussian_kernel CelebALandmarks_FixedScale_augm blur2d argmax2d heatmap2weightmap gaussian_kernel blur2d argmax2d CelebALandmarks_Scaling heatmap2weightmap gaussian_kernel _load_dataset _load_PCAM_CSV get_pcam_data _load_PCAM_H5 read_parameter_file overwrite_parameter_file str2bool validate create_result_dir train train_arg_parser train_one_epoch get_model get_available_gpus PCAM_SE2 PCAM_SE2_norotaugm _B_39 _B_13 _B_6 _B_12 _B_45 _B_40 _B_23 _B_38 _B_2 _B_21 _B_14 _B_20 _B_28 _B_4 _B_25 _B_5 _B_7 _B_50 _B_33 _B_32 _B_37 _B_0 _B_26 _B_8 _B_34 _B_30 _B_22 _B_19 _B_24 _B_18 _B_46 _B_36 _B_49 _B_9 _B_1 _B_31 _B_41 _B_16 _B_42 _B_15 _B_27 _B_17 B _B_43 _B_10 _B_44 _B_48 _B_29 _B_35 _B_47 _B_3 _B_11 ConvGGLayer layers ConvRnGLayer ConvRnRnLayer G Rn H G Rn H _load_dataset join transpose array _load_H5 isinstance remove list_local_devices add_argument ArgumentParser join strftime makedirs basename copy getattr load_module info net time format print float64 min astype mean shape sqrt run info ceil zeros round range len time permutation format print float64 min astype mean shape sqrt run info ceil zeros round range len validate loss_l2 Saver save reset_default_graph is_training_ph get_celebanoses_data GPUOptions Session run exists round basicConfig restore create_result_dir x_ph _absl_handler addHandler get_collection MomentumWOptimizer train_one_epoch ceil piecewise_constant range Graph MomentumOptimizer StreamHandler removeHandler info y_ph join int as_default Variable print optimizer_wd UPDATE_OPS global_variables_initializer get_model loss len reshape transpose stack cast int32 argmax prob Normal range einsum int concat depthwise_conv2d gaussian_kernel round reduce_mean reduce_sum _load_dataset _load_PCAM_CSV _load_PCAM_H5 accuracy_score roc_auc_score accuracy_score roc_auc_score success_rate number_of_errors get_pcam_data labels_ph inputs_ph str eval constant array constant array concat n
## Spline G-CNNs This repository contains the source code accompanying the paper "B-Spline CNNs on Lie Groups" which is published ICLR 2020 (https://openreview.net/forum?id=H1gBhkBFDH). The experiments performed in this paper are based on the `gsplinets_tf` library found in this repository. The full set of experiments can be reproduced using the scripts found in the directory `experiments`. ![Group convolutional NNs](figs/overviewFig.png) *In G-CNNs feature maps are lifted to the high-dimensional domain of the group G in which features are disentangled with respect to pose/transformation parameters. G-convolution kernels then learn to recognize high-level features in terms of patterns of relative transformations, described by the group structure. This is conceptually illustrated for the detection of faces, which in the SE(2) case are considered as a pattern of lines in relative positions and orientations, or in the scale-translation case as blobs/circles in relative positions and scales. The G-CNNs are equivariant to transformation in G applied to the input; i.e., no information gets lost, it is just shifted to different locations in the network (just as input-translations lead to output translations in standard CNNs).* ## Some notes about the code The experiments in the paper are build upon the library `gsplinets_tf`. This library is constructed in a modular way keeping future extensions in mind. E.g. only the core group definitions need to be defined in a group class. See e.g. `gsplinets_tf\group` for an implementation of the roto-translation group (`SE2.py`) and the scale-translation group (`R2R+.py`). The layers (lifting convolution: `ConvRdG` and group convolution `ConvGG`) are then automatically constructed in the correct way. See respectively the documentation and demo in the folders `docs` and `demo`. The code, as it currently is, is not particularly optimized for speed, but rather for flexibility w.r.t. the group classes. The code works by defining an analytic B-spline kernel which are defined by some learnable basis coefficients and which can be sampled on an arbitrary grid. Transformed convolution kernels are then simply obtained by letting a group element act on the grid, and resample the kernel. For each sub-transformation *h* the convolutions are repeated. *TODO: Speed improvement by considering seperability of the cardinal B-splines, and e.g., pre-blurring followed by (dilated) convolutions (in the case of scale-translation networks).* *TODO: Generalize to d-dimensional base domains. Currently the code is based on 2D CNNs.* ## Folder structure
1,979
ecker-lab/robust-bdd
['domain generalization']
['Assessing out-of-domain generalization for robust building damage detection']
twostream-resnet50/train.py twostream-resnet50/utils/output_fusion.py twostream-resnet50/model/twostream_resnet50_diff.py dualhrnet/train.py twostream-resnet50/model/caller.py dualhrnet/models/dual_hrnet.py dualhrnet/lovasz.py twostream-resnet50/utils/make_dataset.py dualhrnet/xview2.py twostream-resnet50/utils/xview2_metrics.py twostream-resnet50/utils/load.py dualhrnet/models/__init__.py twostream-resnet50/test.py dualhrnet/scoring/xview2_metrics.py twostream-resnet50/utils/download.py dualhrnet/test.py twostream-resnet50/utils/augment.py dualhrnet/utils.py twostream-resnet50/utils/dataset.py lovasz_grad flatten_binary_scores iou binary_xloss xloss lovasz_hinge_flat StableBCELoss lovasz_hinge lovasz_softmax_flat isnan mean flatten_probas lovasz_softmax iou_binary bn_update _check_bn ModelWraper _reset_bn _get_momenta _check_bn_apply main argmax _set_momenta bn_update _check_bn _reset_bn ModelLossWraper _get_momenta _check_bn_apply main _set_momenta CRF_Refiner safe_mkdir AverageMeter inter_and_union preprocess adjust_learning_rate download_weights DownloadProgressBar OhemCrossEntropy XView2Dataset AtrousSpatialPyramidPoolingModule Bottleneck HighResolutionModule HighResolutionNet conv3x3 DualHRNet get_model BasicBlock compute_tp_fn_fp F1Recorder XviewMetrics RowPairCalculator PathHandler _get_momenta test adjust_learning_rate train test_twostage _set_momenta UpBlockForUNetWithResNet50 ConvBlock Bridge TwoStream_Resnet50_Diff cut_and_resize_one cut_and_resize DisastersDatasetUnet download_weights DownloadProgressBar make_output_directory colorize_mask_ create_mask_png create_multiple_mask_pngs load_mask_png polygons_to_mask process_one copy_twomodel_preds DeepMerge max_freq_per_component_fusion compute_tp_fn_fp F1Recorder XviewMetrics RowPairCalculator PathHandler cumsum sum len mean zip append float sum zip append float sum range mean lovasz_hinge_flat data lovasz_grad relu Variable sort dot float view Variable float flatten_binary_scores mean lovasz_softmax_flat data lovasz_grad Variable sort size dot append float abs size view filterfalse next iter enumerate list model to float size training apply tqdm device train keys _BatchNorm issubclass __class__ apply ones_like issubclass zeros_like running_mean _BatchNorm __class__ running_var _BatchNorm issubclass __class__ momentum _BatchNorm issubclass __class__ DataLoader rename download_weights argmax load_state_dict XView2Dataset imsave format replace ModelWraper XviewMetrics astype eval compute_score startswith zip listdir config_path data_folder enumerate join uint8 safe_mkdir deepcopy print weights model_wrapper tqdm IS_SPLIT_LOSS get_model makedirs endswith cpu_count zero_grad SGD DataParallel adjust_learning_rate NUM_EPOCHS device save cuda sorted list to sum next model_loss range update LR info sample keys bn_update backward SWA AverageMeter cpu train step swap_swa_sgd len histogram copy ToTensor random resize max log fromarray ROTATE_90 FLIP_LEFT_RIGHT FLIP_TOP_BOTTOM ndarray transpose int64 append NEAREST data_transforms LongTensor size Compose astype Normalize isinstance ANTIALIAS pow randint float makedirs print format DualHRNet init_weights PRETRAINED sum model zero_grad ReduceLROnPlateau adjust_learning_rate save device f1 dataset argmax str sorted list load_state_dict encode append to sum next range cat format sample long keys enumerate join time criterion backward print timestamp zeros step len int print size save resize crop range open int size save resize crop range open Normalize load list uint8 ones fillPoly maximum append zeros open fromarray colorize_mask_ save polygons_to_mask save polygons_to_mask uint8 astype putpalette array open str uint8 listdir imwrite replace endswith print astype mkdir moveaxis range cut_and_resize_one list cutwidth output_folder endswith create_multiple_mask_pngs resizewidth set range split median arange colorize_mask_ where save round max open griddata fromarray sorted list shape meshgrid range copytree astype copy mean mkdir unique nan zip label join uint8 int tqdm masked_invalid zeros ravel array data zeros_like where long unique label to argmax max range
# Assessing out-of-domain generalization for robust building damage detection This repository contains code for the paper ["Assessing out-of-domain generalization for robust building damage detection"](https://arxiv.org/abs/2011.10328) by Vitus Benson and Alexander Ecker. We use the Dual-HRNet from https://github.com/DIUx-xView/xView2_fifth_place and the xView2-Score from https://github.com/DIUx-xView/xView2_scoring. # Setup Get yourself a copy of the xBD dataset from https://xView2.org Install Anaconda or Miniconda. Run ``` bash -i setup.sh /path/to/xbd/ ```
1,980
ecs-vlc/torchbearer
['data visualization']
['Torchbearer: A Model Fitting Library for PyTorch']
tests/callbacks/test_cutout.py torchbearer/callbacks/mixup.py torchbearer/callbacks/weight_decay.py tests/metrics/test_roc_auc_score.py tests/test_cv_utils.py torchbearer/metrics/timer.py tests/callbacks/test_terminate_on_nan.py torchbearer/callbacks/unpack_state.py tests/callbacks/test_callbacks.py torchbearer/bases.py torchbearer/callbacks/imaging/imaging.py torchbearer/metrics/default.py tests/callbacks/test_init.py torchbearer/callbacks/aggregate_predictions.py torchbearer/metrics/wrappers.py torchbearer/callbacks/imaging/inside_cnns.py tests/callbacks/test_csv_logger.py torchbearer/metrics/__init__.py tests/callbacks/test_unpack_state.py tests/metrics/test_primitives.py torchbearer/trial.py torchbearer/callbacks/tensor_board.py tests/callbacks/test_live_loss_plot.py torchbearer/callbacks/pycm.py setup.py torchbearer/metrics/metrics.py tests/callbacks/test_printer.py torchbearer/callbacks/manifold_mixup.py tests/callbacks/test_weight_decay.py torchbearer/callbacks/early_stopping.py docs/conf.py torchbearer/state.py tests/callbacks/test_aggregate_predictions.py tests/test_end_to_end.py docs/_static/examples/tensorboard.py tests/callbacks/test_mixup.py tests/metrics/test_timer.py torchbearer/callbacks/torch_scheduler.py torchbearer/callbacks/csv_logger.py torchbearer/callbacks/printer.py tests/callbacks/test_pycm.py torchbearer/callbacks/between_class.py torchbearer/metrics/decorators.py tests/callbacks/imaging/test_inside_cnns.py torchbearer/callbacks/gradient_clipping.py tests/metrics/test_wrappers.py torchbearer/callbacks/lsuv.py tests/callbacks/test_torch_scheduler.py torchbearer/callbacks/decorators.py docs/_static/examples/visdom_note.py torchbearer/__init__.py torchbearer/callbacks/callbacks.py tests/test_magics.py torchbearer/cv_utils.py tests/callbacks/test_checkpointers.py tests/test_state.py torchbearer/callbacks/init.py torchbearer/callbacks/label_smoothing.py torchbearer/callbacks/__init__.py torchbearer/callbacks/cutout.py torchbearer/metrics/aggregators.py tests/callbacks/test_manifold_mixup.py torchbearer/metrics/roc_auc_score.py tests/metrics/test_lr.py torchbearer/version.py tests/metrics/test_aggregators.py tests/callbacks/test_tensor_board.py tests/callbacks/test_label_smoothing.py torchbearer/callbacks/terminate_on_nan.py tests/callbacks/test_gradient_clipping.py tests/test_bases.py tests/callbacks/test_sample_pairing.py torchbearer/callbacks/live_loss_plot.py tests/metrics/test_decorators.py torchbearer/metrics/primitives.py torchbearer/magics.py tests/callbacks/test_early_stopping.py tests/metrics/test_metrics.py torchbearer/callbacks/checkpointers.py tests/callbacks/imaging/test_imaging.py torchbearer/callbacks/imaging/__init__.py tests/callbacks/test_decorators.py docs/_static/examples/distributed_data_parallel.py torchbearer/metrics/lr.py torchbearer/callbacks/sample_pairing.py tests/callbacks/test_between_class.py tests/test_trial.py tests/metrics/test_default.py sync ToyModel worker setup cleanup average_gradients sync_model grad flatten SimpleModel SimpleModel TestCallback TestApexCrit TestBaseCrit TestMetric TestCVUtils TestEndToEnd Net loss NetWithState TestMagics TestStateKey TestState TestTrialValEvalPred TestWithClosureAndLoader TestMockOptimizer TestWithGenerators _StateMaker TestTrialFunctions TestWithData TestRun TestCallbackListInjection TestTestPass TestFitPass TestTrialMembers TestReplay TestAggregatePredictions TestBCPlus TestCallbackList TestModelCheckpoint TestMostRecent TestCheckpointer TestInterval TestBest TestCSVLogger TestCutOut TestDecorators TestEarlyStopping TestGradientClipping TestGradientNormClipping TestSimpleInits TestWeightInit TestLsuv TestLabelSmoothingRegularisation TestLiveLossPlot TestModule TestManifoldMixup TestModule2 TestModel TestMixupAcc TestMixupInputs TestFormatMetrics TestConsolePrinter TestTqdm TestPyCM TestHandlers TestSamplePairing TestTensorbardText TestTensorBoardImages TestTensorBoardProjector TestTensorBoard TestTerminateOnNaN TestReduceLROnPlateau TestCosineAnnealingLR TestMultiStepLR TestExponentialLR TestCyclicLR TestTorchScheduler TestStepLR TestLambdaLR TestUnpackState TestWeightDecay TestFromState TestHandlers TestImagingCallback TestCachingImagingCallback TestMakeGrid TestClassAppearanceModel TestRunningMetric TestStd TestRunningMean TestVar TestMean TestDecorators TestDefaultAccuracy TestLR TestAdvancedMetric TestMetricList TestMetricTree TestMeanSquaredError TestCategoricalAccuracy TestBinaryAccuracy TestLoss TestEpoch TestTopKCategoricalAccuracy TestRocAucScore TestTimer TestTimerMetric TestBatchLambda TestEpochLambda TestToDict cite apex_closure no_grad _forward_with_exceptions _get_param_list set_doc _patch_call Metric base_closure enable_grad get_metric Callback train_valid_splitter DatasetValidationSplitter SubsetDataset get_train_valid_sets is_notebook torchbearer set_notebook State state_key StateKey get_printer load_batch_predict update_device_and_dtype deep_to load_batch_infinite load_batch_none inject_callback Trial inject_sampler load_batch_standard inject_printer MockModel get_default MockOptimizer CallbackListInjection AggregatePredictions BCPlus CallbackList ModelCheckpoint Interval Best MostRecent _Checkpointer CSVLogger RandomErase Cutout BatchCutout CutMix on_criterion on_step_validation LambdaCallback on_start_epoch count_args on_sample bind_to only_if on_init on_step_training on_checkpoint once on_forward_validation on_end once_per_epoch on_criterion_validation on_sample_validation on_start_validation on_start on_end_validation on_start_training add_to_loss on_backward on_end_training on_forward on_end_epoch EarlyStopping GradientNormClipping GradientClipping ZeroBias LsuvInit WeightInit KaimingNormal XavierNormal KaimingUniform XavierUniform LabelSmoothingRegularisation LiveLossPlot no_print LSUV _mixup ManifoldMixup _mixup_inputs MixupAcc Mixup ConsolePrinter Tqdm _format_metrics _to_pyplot PyCM SamplePairing VisdomParams get_writer TensorBoard AbstractTensorBoard TensorBoardText TensorBoardImages TensorBoardProjector close_writer TerminateOnNaN ExponentialLR StepLR TorchScheduler LambdaLR MultiStepLR ReduceLROnPlateau CosineAnnealingLR CyclicLR UnpackState WeightDecay L1WeightDecay L2WeightDecay _to_pyplot FromState ImagingCallback _cache_images _to_file _to_tensorboard _to_visdom MakeGrid CachingImagingCallback _CAMWrapper ClassAppearanceModel _cam_loss RunningMean RunningMetric Std Var Mean var default_for_key std _wrap_and_add_to_tree lambda_metric running_mean mean to_dict DefaultAccuracy _get_lr LR super AdvancedMetric MetricList add_default get_default MetricTree super TopKCategoricalAccuracy MeanSquaredError BinaryAccuracy CategoricalAccuracy Loss Epoch RocAucScore super TimerMetric _TimerMetric super BatchLambda ToDict EpochLambda master init_process_group destroy_process_group data get_world_size all_reduce parameters float data get_world_size all_reduce parameters float sync_model average_gradients view SGD DataLoader run setup with_train_generator cleanup DDP Trial node DistributedSampler rank hash to next CrossEntropyLoss format MNIST print parameters isinstance exc_info format warn int randperm floor train_valid_splitter TensorDataset isinstance set_notebook getargspec Tqdm Callback list isinstance range to is_tensor is_floating_point len next deep_to next deep_to items list dtype isinstance Interval Best str sorted list join OrderedDict rounder keys Blues VisdomParams join SummaryWriter Visdom add VisdomWriter makedirs discard close join join isclass __name__ add_child isclass child_func MetricTree __name__ append param_groups isclass metric
**Note:** We're moving to PyTorch Lightning! Read about the move [here](https://medium.com/pytorch/pytorch-frameworks-unite-torchbearer-joins-pytorch-lightning-c588e1e68c98). From the end of February, torchbearer will no longer be actively maintained. We'll continue to fix bugs when they are found and ensure that torchbearer runs on new versions of pytorch. However, we won't plan or implement any new functionality (if there's something you'd like to see in a training library, consider creating an issue on [PyTorch Lightning](https://github.com/PyTorchLightning/pytorch-lightning)). <img alt="logo" src="https://raw.githubusercontent.com/pytorchbearer/torchbearer/master/docs/_static/img/logo_dark_text.svg?sanitize=true" width="100%"/> [![PyPI version](https://badge.fury.io/py/torchbearer.svg)](https://badge.fury.io/py/torchbearer) [![Python 2.7 | 3.5 | 3.6 | 3.7](https://img.shields.io/badge/python-2.7%20%7C%203.5%20%7C%203.6%20%7C%203.7-brightgreen.svg)](https://www.python.org/) [![PyTorch 1.0.0 | 1.1.0 | 1.2.0 | 1.3.0 | 1.4.0](https://img.shields.io/badge/pytorch-1.0.0%20%7C%201.1.0%20%7C%201.2.0%20%7C%201.3.0%20%7C%201.4.0-brightgreen.svg)](https://pytorch.org/) [![Build Status](https://travis-ci.com/pytorchbearer/torchbearer.svg?branch=master)](https://travis-ci.com/pytorchbearer/torchbearer) [![codecov](https://codecov.io/gh/pytorchbearer/torchbearer/branch/master/graph/badge.svg)](https://codecov.io/gh/pytorchbearer/torchbearer) [![Documentation Status](https://readthedocs.org/projects/torchbearer/badge/?version=latest)](https://torchbearer.readthedocs.io/en/latest/?badge=latest) [![Downloads](https://pepy.tech/badge/torchbearer)](https://pepy.tech/project/torchbearer) <p align="center"> <a href="http://pytorchbearer.org">Website</a> • <a href="https://torchbearer.readthedocs.io/en/latest/">Docs</a> • <a href="#examples">Examples</a> • <a href="#install">Install</a> • <a href="#citing">Citing</a> •
1,981
edbs08/LU_Net_Research
['semantic segmentation']
['LU-Net: An Efficient Network for 3D LiDAR Point Cloud Semantic Segmentation Based on End-to-End-Learned 3D Features and U-Net']
LU_Net_TFRecords/auxiliary/SSCDataset.py tools/scan_analysis.py LU_Net_pointcloud/semantic_kitti_api/remap_semantic_labels.py LU_Net_TFRecords/auxiliary/filelist2files.py LU_Net_TFRecords/auxiliary/laserscan.py tools/visual_results_compare.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/torch_ioueval_cm.py LU_Net_TFRecords/auxiliary/camera.py tools/pc2ri.py LU_Net_pointcloud/train_aug.py LU_Net_TFRecords/plot_cm.py tools/generate_dataset.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/laserscanvis.py LU_Net_pointcloud/semantic_kitti_api/evaluate_semantics_CM.py LU_Net_pointcloud/semantic_kitti_api/commands.py tools/predict_Knn_from_GT.py LU_Net_TFRecords/auxiliary/glow.py LU_Net_pointcloud/range_image_utils.py LU_Net_TFRecords/test_one.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/laserscan.py LU_Net_pointcloud/pre_processing.py LU_Net_TFRecords/auxiliary/torch_ioueval.py LU_Net_TFRecords/test_all.py LU_Net_pointcloud/settings.py LU_Net_pointcloud/data_loader.py tools/metrics_computation.py LU_Net_pointcloud/semantic_kitti_api/count.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/SSCDataset.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/torch_ioueval.py LU_Net_pointcloud/test_all.py LU_Net_TFRecords/data_loader.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/np_ioueval_cm.py LU_Net_TFRecords/auxiliary/laserscanvis.py LU_Net_pointcloud/semantic_kitti_api/evaluate_semantics_by_distance.py LU_Net_TFRecords/train_V4.py LU_Net_TFRecords/settings.py LU_Net_pointcloud/semantic_kitti_api/visualize_voxels.py tools/frames_to_video.py tools/visual_data.py LU_Net_pointcloud/semantic_kitti_api/validate_submission.py LU_Net_pointcloud/test_one.py LU_Net_TFRecords/visual_data.py LU_Net_pointcloud/semantic_kitti_api/evaluate_completion.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/np_ioueval.py LU_Net_pointcloud/semantic_kitti_api/generate_sequential.py LU_Net_pointcloud/semantic_kitti_api/evaluate_semantics.py LU_Net_TFRecords/predict_RI_Knn.py LU_Net_TFRecords/auxiliary/np_ioueval.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/camera.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/filelist2files.py LU_Net_pointcloud/semantic_kitti_api/auxiliary/glow.py LU_Net_TFRecords/make_tfrecord.py LU_Net_pointcloud/semantic_kitti_api/content.py LU_Net_pointcloud/semantic_kitti_api/visualize.py ri_to_xyz_mask ri_to_xyz_intensity_depth_mask gt_to_label ri_to_depth_height_intensity_mask_noclip interp_data ri_to_depth_height_mask_noclip apply_mask fill_sky pointnetize ri_to_depth_height_intensity_mask lindepth_to_mask ri_to_depth_height_mask clip_normalize clip_mask_normalize get_range_image range_image_processing get_range_image Settings compute_iou_per_class seq_to_idx label_to_xyz test softmax erase_line ckpt_exists label_to_img read_example compute_iou_per_class seq_to_idx label_to_xyz test softmax erase_line plot_confusion_matrix ckpt_exists label_to_img read_example slice_tensor get_next_batch time_to_speed time_to_speed_2 conv_transpose_layer print_config maxpool_layer get_last_checkpoint get_list_pc_files_val u_net conv_layer seq_to_idx make_dir gen_dice_class_mean train u_net_loss get_learning_rate get_list_pc_files_train read_example range_images_from_file get_eval_mask unpack load_gt_volume load_pred_volume parse_calibration parse_poses ValidationException unpack RotY Trans Camera RotX pack GlTextureRectangle GlBuffer uivec3 GlShader vec4 vec2 vec3 GlProgram uivec2 uivec4 ivec4 ivec3 ivec2 LaserScan SemLaserScan LaserScanVis iouEval iouEval SSCDataset unpack iouEval iouEval ri_to_xyz_mask ri_to_xyz_intensity_depth_mask gt_to_label ri_to_depth_height_intensity_mask_noclip interp_data ri_to_depth_height_mask_noclip apply_mask fill_sky pointnetize ri_to_depth_height_intensity_mask lindepth_to_mask ri_to_depth_height_mask clip_normalize clip_mask_normalize get_range_image make_tfrecord get_data get_name plot_confusion_matrix seq_to_idx pc_propagation pc_propagation_Knn softmax erase_line get_trainig_data read_example predict_ri Settings compute_iou_per_class seq_to_idx label_to_xyz test softmax erase_line ckpt_exists label_to_img read_example compute_iou_per_class seq_to_idx label_to_xyz test softmax erase_line plot_confusion_matrix ckpt_exists label_to_img read_example seq_to_idx slice_tensor get_learning_rate time_to_speed train make_dir maxpool_layer gen_dice_class_mean conv_layer conv_transpose_layer print_config get_last_checkpoint u_net read_example u_net_loss visual_data_function RotY Trans Camera RotX pack GlTextureRectangle GlBuffer uivec3 GlShader vec4 vec2 vec3 GlProgram uivec2 uivec4 ivec4 ivec3 ivec2 LaserScan SemLaserScan LaserScanVis iouEval SSCDataset unpack iouEval get_range_image visualize compute_iou_per_class semi_propagate open_label_and_map count_points_pc fully_propagate generate_pointcloud_txt plot_fist_frames compute_metrics pc_bin_to_txt read_print_metrics groundtruth_pointcloud load_velodyne_binary pc2ri_pw_360 load_velodyne_txt lidar_to_2d_front_view_3 pc2ri_pw map_labels load_velodyne_binary_labels reasign_RI_values get_trainig_data_D_R pc_propagation_Knn predict_from_GT get_trainig_data get_trainig_data_xyzi open_label visual_data_function normal_display paint_single_class list_files2 comprate_ruttine get_inverse_label RI_comprate_ruttine pc_to_image_color analyze_cfg colorize_range_image get_semantic_RI load_and_compare rgb_semantics clip logical_and clip connectedComponents uint8 imwrite astype where range zeros range where astype float32 sqrt apply_mask clip_mask_normalize astype float32 sqrt apply_mask clip_mask_normalize sqrt astype float32 apply_mask sqrt astype float32 apply_mask griddata arange shape meshgrid zeros ravel range arange reshape delete pad floor zeros range DIST_L2 int uint8 exp print getStructuringElement astype float32 distanceTransform MORPH_RECT logical_or DIST_MASK_PRECISE dilate zeros range amax join str open_label LABELS_DATA concatenate colorize reshape len SemLaserScan open_scan zeros sep split DIST_L2 int uint8 print getStructuringElement astype float32 distanceTransform MORPH_RECT apply_mask logical_or DIST_MASK_PRECISE pointnetize dilate zeros range amax print safe_load open exp write zeros argmax range sum where zeros argmax array range format write close where argmax array range open append seq_to_idx feature reshape fromstring Example ParseFromString take argmax CHANNELS str format TEST_OUTPUT_PATH TEST_CHECKPOINT print Graph TFRECORD_VAL makedirs list arange product yticks text xlabel tight_layout colorbar ylabel imshow title figure xticks max range len join print TRAIN_SEQ sort LIDAR_DATA join print sort LIDAR_DATA VALIDATION_SEQ repeat shuffle batch get_range_image decode range_image_processing make_one_shot_iterator map batch ones_like zeros_like is_finite reshape reduce_sum where shape softmax format print IMAGE_HEIGHT upper IMAGE_WIDTH IMAGE_DEPTH sum makedirs glob int replace append N_CLASSES time_to_speed print_config Saver set_verbosity save Session run OUTPUT_LOGS str list restore BATCH_SIZE get_collection merge_all placeholder get_last_checkpoint add_summary get_default_graph get_list_pc_files_val u_net LEARNING_RATE NUM_ITERS range start_queue_runners format global_variables_initializer ERROR list_files shuffle FileWriter u_net_loss keys OUTPUT_MODEL int time get_learning_rate print AdamOptimizer Coordinator UPDATE_OPS get_list_pc_files_train zeros ones_like zeros fromfile unpack fromfile zeros split close open inv matmul append zeros open cos sin cos sin reshape int list bool N_CLASSES print tolist randint shape zeros quit fliplr range count get_name print safe_load AUGMENTATION quit range open astype around join print tofile astype SemLaserScan LIDAR_DATASET save open_scan zeros uint32 range len proj_H proj_mask proj_W zeros range join print fit astype SemLaserScan tofile LIDAR_DATASET points get_trainig_data KNeighborsClassifier open_scan zeros save uint32 range predict len join str format TEST_CHECKPOINT print Graph rmtree safe_load SEMKITTI_CFG mkdir open read TFRecordReader string_input_producer decode_raw print float32 parse_example gather shuffle_batch floor LR_DECAY_INTERVAL open safe_load LR_DECAY_VALUE join dtype uint8 namedWindow print COLOR_HSV2BGR astype shape imshow sleep zeros cvtColor amax applyColorMap uint8 max COLORMAP_JET fromfile reshape size proj_mask points zeros range zeros size range proj_mask zeros size range open_label_and_map len compute_iou_per_class load list show LaserScan subplots plot open_label_and_map semi_propagate grid set mean linspace open_scan zeros keys range load list format print astype float keys range len compute_iou_per_class load list LaserScan open_label_and_map print semi_propagate size save open_scan zeros sum keys range read_print_metrics len open_label fully_propagate show subplot list proj_sem_color SemLaserScan imshow title savetxt range LaserScan colorize open_scan groundtruth_pointcloud keys load semi_propagate float32 zeros len join LaserScan float32 savetxt open_scan groundtruth_pointcloud LaserScan print size open_scan range int radians arctan2 astype sqrt zeros print reshape transpose map_labels set_printoptions fromfile fromfile reshape transpose print transpose shape to_numpy read_csv int arctan2 print astype rad2deg sqrt flip zeros arcsin array range arctan2 astype rad2deg sqrt flip zeros arcsin array range proj_H proj_mask proj_W zeros range proj_H proj_mask proj_W zeros range print range get_trainig_data_D_R reasign_RI_values transpose remissions array get_trainig_data_xyzi load join format print sort len rmtree safe_load pc_propagation_Knn mkdir range open fromfile reshape load namedWindow print waitKey imshow zeros array range walk zeros range load join list format subplot gcf set_size_inches show print len list_files2 subplots_adjust cla imshow title clf range colorize_range_image range uint8 COLOR_HSV2BGR astype get_inverse_label zeros cvtColor range amax load subplot int show print shape imshow zeros pc_to_image_color range amax waitKey list print safe_load zeros keys open open_label print colorize SemLaserScan shape open_scan len zeros range join namedWindow rgb_semantics print waitKey imshow safe_load quit get_semantic_RI open
# Deep learning-based LiDAR Point-cloud Semantic Segmentation using 2D Range Image This project uses LU-Net as starting point and adapts it to the SemanticKITTI dataset. Throughout an exploratory research, we developed improvements to the original architecture to achieve higher score (mean Intersection over union). We offer two versions of the training workflow: ### LU_Net_TFRecords This version requires the generation of TFRecords for faster and independent training on a range image level. Before training, the user should run a script to generate the TensorFlow records that performs all the preprocessing and binarizes the training examples. This version is recommended for faster training. ### LU_Net_pointcloud This version works directly from the point cloud, performing all the preprocessing for each instance at each iteration. It is suitable for testing different configurations at any point of the process without the creation of TFRecords.
1,982
edgarjimenez1996/-fashion-mnist
['data augmentation']
['DENSER: Deep Evolutionary Network Structured Representation']
utils/helper.py configs.py benchmark/convnet.py app.py benchmark/runner.py utils/argparser.py utils/mnist_reader.py visualization/project_zalando.py start_s3_sync get_json_logger touch touch_dir _get_logger main cnn_model_fn PredictJob JobWorker JobManager get_args_request parse_arg get_args_cli now_int upload_result_s3 get_sprite_image invert_grayscale create_sprite_image vector_to_matrix_mnist UploadS3Thread load_mnist UploadS3Thread start Event dirname makedirs makedirs setFormatter touch_dir DEBUG getLogger addHandler StreamHandler Formatter touch setLevel INFO FileHandler setFormatter getLogger addHandler Formatter touch setLevel INFO FileHandler dense max_pooling2d dropout one_hot minimize reshape GradientDescentOptimizer conv2d softmax_cross_entropy asarray evaluate print Estimator shuffle labels images numpy_input_fn train range read_data_sets int append items list defaultdict utcfromtimestamp info int isinstance ones sqrt ceil array range vector_to_matrix_mnist invert_grayscale join
# Fashion-MNIST [![GitHub stars](https://img.shields.io/github/stars/zalandoresearch/fashion-mnist.svg?style=flat&label=Star)](https://github.com/zalandoresearch/fashion-mnist/) [![Gitter](https://badges.gitter.im/zalandoresearch/fashion-mnist.svg)](https://gitter.im/fashion-mnist/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link) [![Readme-CN](https://img.shields.io/badge/README-中文-green.svg)](README.zh-CN.md) [![Readme-JA](https://img.shields.io/badge/README-日本語-green.svg)](README.ja.md) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Year-In-Review](https://img.shields.io/badge/%F0%9F%8E%82-Year%20in%20Review-orange.svg)](https://hanxiao.github.io/2018/09/28/Fashion-MNIST-Year-In-Review/) <details><summary>Table of Contents</summary><p> * [Why we made Fashion-MNIST](#why-we-made-fashion-mnist) * [Get the Data](#get-the-data)
1,983
edogdu/covid19
['causal inference']
['Causal Modeling of Twitter Activity During COVID-19']
program1.py
# COVID-19 We are going to analyze COVID-19 related tweets provided by: https://github.com/echen102/COVID-19-TweetIDs ## References - Gencoglu, O., & Gruber, M. (2020). <a href="https://arxiv.org/pdf/2005.07952.pdf">Causal Modeling of Twitter Activity During COVID-19</a>. arXiv preprint arXiv:2005.07952. - Kursuncu, U., Gaur, M., Lokala, U., Thirunarayan, K., Sheth, A., & Arpinar, I. B. (2019). <a href="https://arxiv.org/pdf/1806.02377.pdf">Predictive analysis on Twitter: Techniques and applications</a>. In Emerging research challenges and opportunities in computational social network analysis and mining (pp. 67-104). Springer, Cham. - COVID-19 Analytics by Novi Systems: https://novi.systems/covid-19/ - COVID-19 HPC Consortium https://covid19-hpc-consortium.org ## Learning - Data Science and Cognitive Computing Courses https://cognitiveclass.ai
1,984
edosedgar/mtcnnattack
['face detection', 'adversarial attack']
['Real-world adversarial attack on MTCNN face detection system']
mtcnn/mtcnn.py mtcnn/helpers.py mtcnn/tf_network.py utils/inter_area.py utils/patch_mng.py mtcnn/detect_face.py adversarial_gen.py TrainMask LossManager detect_face bulk_detect_face nms imresample bbreg pad generateBoundingBox rerec get_scales RNet create_mtcnn ONet PNet layer Network resize_area_batch inter_area_batch PatchPartTF ImageTF PatchManager PatchTF where vstack pnet nms transpose pad add_rnet_in ceil append expand_dims imresample range hstack astype copy bbreg tile generateBoundingBox add_onet_in empty get_scales int rnet onet int32 rerec zeros where vstack pnet nms transpose pad ceil append imresample range hstack astype copy bbreg tile generateBoundingBox power empty zeros enumerate minimum int rnet onet int32 rerec amin len amin reshape transpose vstack transpose hstack where fix flipud vstack empty argsort maximum zeros_like minimum ones astype where int32 expand_dims transpose maximum tile resize realpath scalar split shape
# Real-world attack on MTCNN face detection system By Edgar Kaziakhmedov, Klim Kireev, Grigorii Melnikov, Mikhail Pautov and Aleksandr Petiushko This is the code for the [research article](http://arxiv.org/abs/1910.06261). The video is available [here](https://youtu.be/OY70OIS8bxs). ## Abstract Recent studies proved that deep learning approaches achieve remarkable results on face detection task. On the other hand, the advances gave rise to a new problem associated with the security of the deep convolutional neural network models unveiling potential risks of DCNNs based applications. Even minor input changes in the digital domain can result in the network being fooled. It was shown then that some deep learning-based face detectors are prone to adversarial attacks not only in a digital domain but also in the real world. In the paper, we investigate the security of the well-known cascade CNN face detection system - MTCNN and introduce an easily reproducible and a robust way to attack it. We propose different face attributes printed on an ordinary white and black printer and attached either to the medical face mask or to the face directly. Our approach is capable of breaking the MTCNN detector in a real-world scenario. ## The repo The repository is organized as follows: * **input_img** stores all images to be used for training, should be colored with patch markers. A row in the grid must be same-colored. The color difference between the neighbouring marker rows must not be greater than 1;
1,985
eduardgorbunov/accelerated_clipping
['stochastic optimization']
['Stochastic Optimization with Heavy-Tailed Noise via Accelerated Gradient Clipping']
algorithms.py utils.py functions.py sstm sgd_const_stepsize clipped_sgd_const_stepsize_decr_clip sgd_const_stepsize_toy_expect clipped_sstm clipped_sgd_const_stepsize_toy_expect clipped_sgd_const_stepsize logreg_grad_plus_lasso r logreg_grad toy_function_val prox_R toy_function_grad logreg_loss F compute_L read_solution prepare_data make_plots read_results_from_file save_solution rvs time norm multiply min sqrt beta append gamma array range len rvs time norm min sqrt beta append gamma array range len rvs deepcopy time norm toarray int logreg_grad shape append zeros range array F len rvs deepcopy time norm toarray int logreg_grad shape append zeros range array F len rvs int time norm toarray logreg_grad prox_R shape append zeros range array F len rvs int time norm toarray logreg_grad prox_R shape append zeros range array F len rvs int time norm toarray logreg_grad prox_R shape append zeros range array F len zeros logaddexp dot expit ones abs len count_nonzero shape load_svmlight_file norm toarray Path range max is_file svds str semilogy xlabel yticks ylabel cycle title read_results_from_file figure legend savefig xticks enumerate len
# Stochastic Optimization with Heavy-Tailed Noise via Accelerated Gradient Clipping Code for the paper "Stochastic Optimization with Heavy-Tailed Noise via Accelerated Gradient Clipping" by Eduard Gorbunov, Marina Danilova and Alexander Gasnikov, NeurIPS 2020 https://arxiv.org/pdf/2005.10785.pdf To run the experiments one should download the data from LIBSVM https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary.html and save the datasets in .txt format in the folder called "datasets". Also one should create folders "dump" and "plot". Use jupyter notebooks that we prepared in order to repeat/check our experiments. algorithms.py -- file with implementation of methods utils.py -- file with useful tools for saving results and making plots functions.py -- file with implementation of oracles that we use
1,986
efeatikkan/Chinese_Word_Segmenter
['chinese word segmentation']
['State-of-the-art Chinese Word Segmentation with Bi-LSTMs']
code/other_functions.py code/predict.py code/score.py code/preprocessing.py create_tf_model batch_gen_bi word_to_id_converter predict run_model reverse_bies generator_creator bi_to_id_converter parse_args predict lines_sepearat_map files_creator data_converter beis_generator spacer score parse_args is_valid_prediction label_text_to_iter permutation range len append append range len join list items pad_sequences to_categorical batch_gen_bi len count_nonzero float32 placeholder int64 int32 join add_argument ArgumentParser ceil range len pop join int pad_sequences sort lines_sepearat_map append range enumerate len replace replace range len items list join str print extend keys range len update zip set print is_valid_prediction zip
# Chinese Word Segmenter This is a Chinese Word Segmenter project that is highly based on "State-of-the-art Chinese Word Segmentation with Bi-LSTMs" paper available at https://arxiv.org/abs/1808.06511. In addition to the base model described in the paper, a Conditional Random Field layer is added on top of the dense layer. ## Datasets Academia Sinica, City University of Hong Kong, Peking University and Microsoft Research corpuses (available at http://sighan.cs.uchicago.edu/bakeoff2005/ ) are used for creating token vocabularies and training the model. ## Pretrained Model The pretrained model and token vocabularies to make predictions can be accesed from this link https://drive.google.com/open?id=1rx4zTPL1hGMbk3Zw2BdOV7IjKXGsQqgG . ## Quick Prediction
1,987
eginhard/cae-utd-utils
['speech recognition']
['Multilingual bottleneck features for subword modeling in zero-resource languages']
misc/npz_to_npy.py word_pairs/candidates_to_labels.py word_pairs/count_same_speaker_pairs.py utd/alignment_to_vad.py word_pairs/extract_pair_candidates.py word_pairs/create_pair_file_same.py word_pairs/create_pair_file.py main check_argv get_speaker main check_argv add_argument exit ArgumentParser print_help load npy_fn print check_argv vstack save append npz_fn pairs_fn labels_fn len write close range open
# Zero-resource speech utils This repository contains documentation and utility scripts for several zero-resource speech systems, notably the correspondence autoencoder (cAE) and the ZRTools unsupervised term discovery (UTD) system. The main focus is on using them with the [GlobalPhone corpus](https://csl.anthropomatik.kit.edu/english/globalphone.php). This is not a detailed tutorial and mainly gives high-level instructions. While these allow to run most things, it is expected you also become familiar with the respective systems. Because of dependencies on a number of different systems, it might not
1,988
eharmonicminorperfect5thbelow/pytorch-attention-model-tsp
['combinatorial optimization']
['Attention, Learn to Solve Routing Problems!']
train.py test.py layers.py tsp.py model.py try_gpu Decoder Encoder AttentionModel try_gpu evaluate plot generate_instances is_available zeros range show T concatenate numpy
# pytorch-attention-model-tsp (in development) Implementation of Attention Model for TSP in PyTorch Reference: https://arxiv.org/pdf/1803.08475.pdf
1,989
ehsanik/touchTorch
['human object interaction detection']
['Use the Force, Luke! Learning to Predict Physical Forces by Simulating Effects']
utils/loss_util.py utils/logging_util.py models/no_model_gt_calculator.py utils/obj_util.py utils/environment_util.py solvers/test.py solvers/metrics.py utils/arg_parser.py utils/transformations.py datasets/keypoint_and_trajectory_dataset.py utils/constants.py utils/net_util.py datasets/baseline_force_dataset.py models/__init__.py utils/visualization_util.py models/base_model.py environments/env_wrapper_multiple_object.py environments/bullet_client.py utils/data_loading_utils.py models/baseline_regress_force.py datasets/__init__.py solvers/save_gt_force.py main.py environments/__init__.py solvers/train.py environments/base_env.py models/only_predict_cp_model.py models/image_input_predict_cp_separate_tower.py datasets/tweak_initial_state_dataset.py utils/projection_utils.py models/image_and_cp_input_model_keypoint_predict.py utils/quaternion_util.py environments/physics_env.py models/gt_cp_predict_init_pose_and_force.py main get_model_and_loss get_dataset BaselineForceDatasetWAugmentation DatasetWAugmentation TweakInitialStateDataset BaseBulletEnv BulletClient MultipleObjectWrapper PhysicsEnv BaselineRegressForce BaseModel PredictInitPoseAndForce ImageAndCPInputKPOutModel SeparateTowerModel NoModelGTForceBaseline NoForceOnlyCPModel ObjPositionMetric CPMetric ObjRotationMetric AverageMeter BaseMetric calc_L2_dist ObjKeypointMetric TrajectoryDistanceMetric get_non_default_flags_str model_class environment_class parse_args loss_class dataset_class setup_logging parse_time_str obtain_time_from_img_name get_timestamp_to_clip_index _load_transformation_files obtain_object_name scale_position divide_objects process_projection get_time_from_str convert_to_tensor convert_to_tuple EnvState convert_tensor_to_obj_name convert_obj_name_to_tensor ForceValOnly ScalarMeanTracker LoggingModule KeypointProjectionLoss ForceRegressionLoss CPPredictionLoss KPProjectionCPPredictionLoss BasicLossFunction combine_block upshufflenorelu replace_all_relu_w_leakyrelu replace_all_bn_w_groupnorm CPGradientLayer linear_block imu_un_embed linear_block_norelu combine_block_w_do EnvWHumanCpFiniteDiffFast upshuffle unflat_temporal _upsample_add input_embedding_net flat_temporal obtain_all_vertices_from_obj obtain_vertices_from_any_kind_obj get_keypoint_projection reverse_center_of_mass_translation put_a_dot_on_image project_points put_keypoints_on_image _get_object_keypoints get_set_of_vertices_projection reverse_translation_transformation convert_to_color get_all_objects_keypoint_tensors normalize_quaternion equality_quaternion multiply_quaternion_optimized angle_axis_to_rotation_matrix continue_quaternion quaternion_to_rotation_matrix subtract_quaternion conjugate_quaternion get_quaternion_distance main quaternion_to_angle_axis inverse_quaternion multiply_quaternion orthogonalization_matrix vector_product inverse_matrix euler_matrix translation_matrix shear_matrix vector_norm quaternion_from_matrix quaternion_inverse Arcball projection_matrix unit_vector quaternion_bullet2normal rotation_from_matrix quaternion_to_angle_axis random_rotation_matrix quaternion_from_euler affine_matrix_from_points decompose_matrix clip_matrix quaternion_conjugate quaternion_slerp quaternion_about_axis arcball_map_to_sphere scale_from_matrix euler_from_quaternion angle_between_vectors scale_matrix random_quaternion quaternion_matrix quaternion_imag superimposition_matrix arcball_nearest_axis projection_from_matrix translation_from_matrix is_same_quaternion shear_from_matrix euler_from_matrix rotation_matrix random_vector compose_matrix identity_matrix reflection_matrix concatenate_matrices is_same_transform quaternion_normal2bullet arcball_constrain_to_axis reflection_from_matrix quaternion_multiply quaternion_real _import_module add_border_to_images get_image_list_for_object_traj draw_mesh_overlay get_image_list_for_viz_cp channel_last get_image_list_for_forces normalize save_image_list_to_gif channel_first get_image_list_for_keypoints dataset DataLoader load int format replace reload_from_title_epoch model print manual_epoch index cuda load_state_dict info reload argmax array loss save seed reload_dir get_dataset train_one_epoch parse_args range state_dict format save_gt_force manual_seed info get_model_and_loss optimizer join print sort epochs test_one_epoch view stdout setFormatter getLogger WARNING addHandler StreamHandler Formatter DEBUG setLevel INFO FileHandler items sorted replace isinstance append __name__ data localtime ArgumentParser save LoggingModule seed get_non_default_flags_str argv strftime title logdir format replace pformat manual_seed info vars __name__ setup_logging join time add_argument makedirs append str range Tensor list items obtain_object_name setdefault strptime join strptime replace update items list keys int item sum sum Tensor set_trace tolist set_trace linear_block linear_block_norelu append range len size list Module isinstance ReLU _modules LeakyReLU keys list num_features Module isinstance BatchNorm3d GroupNorm _modules keys append array split parse set_trace Wavefront join transpose to detach device project_points squeeze shape quaternion_to_rotation_matrix reverse_translation_transformation device append to range max min shape float long put_a_dot_on_image float shape device convert_to_color to range to center_of_mass detach device object_name project_points vertex_points to squeeze reverse_translation_transformation device center_of_mass normalize_quaternion shape sum view sqrt ones_like where atan2 normalize_quaternion set_trace Tensor inverse_quaternion multiply_quaternion chunk squeeze _compute_rotation_matrix_taylor transpose squeeze type_as matmul unsqueeze repeat device to _compute_rotation_matrix stack append range multiply_quaternion len norm conjugate_quaternion shape bmm view normalize_quaternion Tensor shape as_quat_array normalize_quaternion multiply_quaternion_optimized rand set_trace normalized conjugate_quaternion inverse conjugate inverse_quaternion multiply_quaternion len identity dot unit_vector identity squeeze eig array cos identity dot sin unit_vector array diag T squeeze eig atan2 trace array dot unit_vector identity diag squeeze eig array trace dot unit_vector array identity T squeeze eig dot array len dot unit_vector tan identity T vector_norm squeeze eig identity cross dot atan array T vector_norm asin inv cos copy atan2 dot any negative zeros array dot euler_matrix identity radians cos sin svd T concatenate inv identity quaternion_matrix roll dot eigh pinv vstack sum array identity sqrt atan2 empty cos sin array cos vector_norm dot array outer eigh trace negative empty array negative array negative array pi dot sin negative unit_vector acos sqrt rand pi sqrt negative array vector_norm dot arcball_constrain_to_axis array atleast_1d sqrt sum array atleast_1d sqrt expand_dims sum array sum array dot identity array array import_module Tensor join uint8 print mimsave shape zeros type range makedirs add_border_to_images EnvState stack unsqueeze interpolate permute append normalize float range cat get_rgb_for_force add_border_to_images EnvState get_rgb_for_position_rotation stack unsqueeze interpolate permute append normalize float range cat add_border_to_images squeeze get_mesh_overlay_projection stack unsqueeze interpolate permute append normalize range cat add_border_to_images EnvState put_keypoints_on_image get_rgb_for_position_rotation unsqueeze stack permute append float range cat detach add_border_to_images EnvState get_rgb_for_position_rotation stack unsqueeze interpolate permute append normalize float range cat cpu Tensor channel_last clamp shape
# [Use the Force Luke! Learning to Predict Physical Forces by Simulating Effects](https://arxiv.org/pdf/2003.12045.pdf) ## K Ehsani, S Tulsiani, S Gupta, A Farhadi, A Gupta This project is an oral presentation at CVPR2020. [(Project Page)](https://ehsanik.github.io/forcecvpr2020/) [(PDF)](https://arxiv.org/pdf/2003.12045.pdf) [(Slides)](https://github.com/ehsanik/forcecvpr2020/blob/master/img/3095-talk.pdf) [(Video)](https://ehsanik.github.io/forcecvpr2020/#slide_video) <center><img src="figs/teaser_force.jpg" height="300px" ></center> ### Abstract When we humans look at a video of human-object interaction, we can not only infer what is happening but we can even extract actionable information and imitate those interactions. On the other hand, current recognition or geometric approaches lack the physicality of action representation. In this paper, we take a step towards a more physical understanding of actions. We address the problem of inferring contact points and the physical forces from videos of humans interacting with objects. One of the main challenges in tackling this problem is obtaining ground-truth labels for forces. We sidestep this problem by instead using a physics simulator for supervision. Specifically, we use a simulator to predict effects and enforce that estimated forces must lead to the same effect as depicted in the video. Our quantitative and qualitative results show that: <ol> <li>We can predict meaningful forces from videos whose effects lead to accurate imitation of the motions observe.</li>
1,990
ehsansherkat/ConVec
['word embeddings']
['Vector Embedding of Wikipedia Concepts and Entities']
WikipediaParser/getText.py WikipediaParser/onlyAnchors.py WikipediaParser/utility.py WikipediaParser/addTittle.py WikipediaParser/extendExistingAnchors.py WikipediaParser/augmentWikipedia.py WikipediaParser/WikiExtractor.py WikipediaParser/prunePages.py WikipediaParser/getGraph.py WikipediaParser/getPages.py addTittle processTittle writeOutputToFile processText extend writeOutputToFile addInLink addOutLink getCleanTextByAnchorID writeOutputToFile onlyAnchors writeOutputToFile isRedirect isDisambiguation extractWikiIDVectors extractCleanText clean27English redirectHashmap numberToLiteral extractInfobox extractCategory extractHeads remove_HTML_XML_char load_templates normalizeTitle normalizeNamespace if_empty numberToLiteral Extractor findMatchingBraces findBalanced TemplateArg pages_from dropSpans ucfirst handle_unicode sharp_if unescape compact sharp_iferror sharp_invoke sharp_ifeq dropNested get_url Infix makeInternalLink makeExternalLink getAnchor replaceExternalLinks MagicWords OutputSplitter lcfirst NextFile sharp_switch process_dump replaceInternalLinksByAnchor Template TemplateText makeInternalLinkAnchor reduce_process makeInternalLinkByAnchor replaceInternalLinks main splitParts makeExternalImage extract_process define_template callParserFunction ignoreTag cleanText fullyQualifiedTemplateTitle sharp_expr str findall replace collect len close writeOutputToFile processTittle sub info append float round open clean27English numberToLiteral strip lower sub encode close write open str isdigit sorted findall replace collect len close processText writeOutputToFile split sub info append float round open clean27English numberToLiteral strip lower sub encode append append str extractCleanText parse append close writeOutputToFile info open float round nodeValue len str isdigit replace strip writeOutputToFile open info append float round split getElementsByTagName parse close append getAttribute nodeValue open sub punctuation strip translate lower maketrans len findall filter_headings clean27English cleanText findall items list replace error write close info open split str isdigit list encode replace write close info append open normalizeNamespace strip group match sub ucfirst append DOTALL IGNORECASE compile DOTALL compile findMatchingBraces extend split pop end search start append compile pop join end search group start append compile match group startswith normalizeNamespace sub strip strip match strip split get next warn fullyQualifiedTemplateTitle sharp_invoke join unescape group warn match sub DOTALL IGNORECASE finditer end search append IGNORECASE compile sort rstrip end rfind strip group match findBalanced find keepLinks find end group match makeExternalImage finditer keepLinks keepLinks clear items list format keepSections sort strip group reversed match split toHTML startswith zip_longest append keepLists keys len int join info len write close define_template open pages_from enumerate find append decode search group stdin decode load_templates expand_templates search put pages_from max exists Process default_timer add sleep append range Value group close start Queue info join FileInput len get extract debug Extractor close getvalue put truncate StringIO stdout NextFile get pop debug default_timer write warn close info OutputSplitter len encode replaceInternalLinks replace unescape numberToLiteral replaceInternalLinksByAnchor end group dropNested sub replaceExternalLinks dropSpans finditer append rstrip end rfind strip group match findBalanced find encode capitalize list rstrip end rfind strip group makeInternalLink makeInternalLinkAnchor match findBalanced append find keepLinks find extract templates getLogger cpu_count article links ArgumentParser pages_from lists DEBUG setLevel exists basicConfig html escapedoc compress no_templates find input parse_args process_dump debug close set lower sections INFO stdout int add_argument_group FileInput add_argument namespaces output makedirs processes ignoreTag split
# ConVec: Vector Embedding of Wikipedia Concepts and Entities WikipediaParser folder contains the code to extract and prepare the Wikipedia dump. Please find in the following, link the pre-traind Concept, Word and Entitie vectors (as a result of this project): - The Wikipedia ID to Title map file (This file maps the Wikipedia ID of a page to its title): https://web.cs.dal.ca/~sherkat/Files/ID_title_map.zip (210MB) - Traind Concepts, Entities and Words: Concepts and entities are presented by their Wikipedia ID. - ConVec https://web.cs.dal.ca/~sherkat/Files/WikipediaClean5Negative300Skip10.zip (3.3GB) - ConVec Fine Tuned: https://dalu-my.sharepoint.com/personal/eh379022_dal_ca/_layouts/15/guestaccess.aspx?docid=0602754033d8a4e65aa8c841aa2efc491&authkey=AZGkUWbSwjiO4SrsPub0LBI (6.86GB) - ConVec Heuristic: https://dalu-my.sharepoint.com/personal/eh379022_dal_ca/_layouts/15/guestaccess.aspx?docid=0b42ef5ba2d3247ccab2c10d5c1691a47&authkey=AYZLBIfjQLta9aAmSaRzymY (3.75GB) - ConVec Only Anchors https://dalu-my.sharepoint.com/personal/eh379022_dal_ca/_layouts/15/guestaccess.aspx?docid=0592fd0392e1f4ec89d84a512e6482d03&authkey=AVpBqVspTRnF0Ra6xedMVIk (3.57GB) Please cite to the following paper if you used the code, datasets and vector embedings:
1,991
eithun/cherry-phyllotaxy
['edge detection']
['Isolating phyllotactic patterns embedded in the secondary growth of sweet cherry (Prunus avium L.) using magnetic resonance imaging']
radius.py helix_interpolation.py polar.py pith.py get_helix get_image find_center_of_slice cross_stencil find_center get_image save_polar_all get_center get_radius save_polar find_radii get_center dist reject_outliers pi arctan2 load boundary_function print tuple shape cross_stencil zeros round append len get_image find_center_of_slice print copy append get_image cos zfill save get_center zeros range get_radius sin Pool map median abs array load T fromfunction print dist get_center append median sobel
# Cherry Phyllotaxy Analysis ## Dependencies - Numpy, Scipy - Matplotlib - Pandas - Skimage ## Data Data are avaliable on figshare (https://doi.org/10.6084/m9.figshare.7409843). ## Paper The paper is on ArXiv: (https://arxiv.org/abs/1812.03321).
1,992
ekazakos/temporal-binding-network
['action recognition', 'egocentric activity recognition']
['EPIC-Fusion: Audio-Visual Temporal Binding for Egocentric Action Recognition']
tf_model_zoo/models/slim/nets/alexnet_test.py tf_model_zoo/models/slim/nets/resnet_v2_test.py tf_model_zoo/models/textsum/data.py tf_model_zoo/inceptionv4/tensorflow_dump.py tf_model_zoo/models/im2txt/im2txt/inference_utils/inference_wrapper_base.py tf_model_zoo/models/slim/preprocessing/preprocessing_factory.py tf_model_zoo/models/street/python/vgsl_eval.py tf_model_zoo/models/transformer/example.py tf_model_zoo/models/video_prediction/prediction_train.py tf_model_zoo/models/street/python/errorcounter_test.py tf_model_zoo/models/slim/nets/inception_v1.py tf_model_zoo/models/slim/nets/lenet.py tf_model_zoo/models/slim/deployment/model_deploy.py tf_model_zoo/models/street/python/errorcounter.py tf_model_zoo/models/inception/inception/inception_eval.py tf_model_zoo/inceptionv4/pytorch_load.py tf_model_zoo/models/differential_privacy/multiple_teachers/utils.py tf_model_zoo/models/inception/inception/dataset.py video_records/epickitchens100_record.py preprocessing_epic/wav_to_dict.py tf_model_zoo/models/inception/inception/imagenet_distributed_train.py tf_model_zoo/models/im2txt/im2txt/configuration.py tf_model_zoo/models/slim/nets/vgg_test.py tf_model_zoo/models/slim/datasets/flowers.py tf_model_zoo/models/textsum/seq2seq_attention_model.py tf_model_zoo/models/slim/datasets/imagenet.py tf_model_zoo/models/syntaxnet/syntaxnet/text_formats_test.py tf_model_zoo/models/im2txt/im2txt/train.py tf_model_zoo/models/slim/nets/inception.py tf_model_zoo/models/slim/nets/overfeat.py tf_model_zoo/models/swivel/swivel.py tf_model_zoo/models/inception/inception/slim/scopes_test.py tf_model_zoo/models/compression/decoder.py tf_model_zoo/models/textsum/seq2seq_lib.py tf_model_zoo/models/im2txt/im2txt/show_and_tell_model.py tf_model_zoo/models/autoencoder/AutoencoderRunner.py tf_model_zoo/models/neural_gpu/neural_gpu_trainer.py tf_model_zoo/models/street/python/nn_ops.py tf_model_zoo/models/inception/inception/flowers_eval.py tf_model_zoo/models/inception/inception/slim/scopes.py tf_model_zoo/models/inception/inception/slim/losses_test.py test.py tf_model_zoo/models/swivel/wordsim.py tf_model_zoo/models/im2txt/im2txt/inference_utils/caption_generator.py tf_model_zoo/models/inception/inception/slim/collections_test.py tf_model_zoo/models/slim/nets/resnet_v2.py tf_model_zoo/bninception/layer_factory.py tf_model_zoo/models/differential_privacy/dp_sgd/dp_optimizer/utils.py tf_model_zoo/models/inception/inception/slim/ops_test.py tf_model_zoo/models/autoencoder/autoencoder_models/Autoencoder.py tf_model_zoo/models/differential_privacy/dp_sgd/dp_optimizer/sanitizer.py tf_model_zoo/models/slim/eval_image_classifier.py tf_model_zoo/models/slim/train_image_classifier.py tf_model_zoo/models/syntaxnet/syntaxnet/load_parser_ops.py tf_model_zoo/models/autoencoder/VariationalAutoencoderRunner.py tf_model_zoo/models/im2txt/im2txt/ops/image_embedding.py tf_model_zoo/models/differential_privacy/multiple_teachers/aggregation.py context_gating.py tf_model_zoo/models/neural_programmer/neural_programmer.py tf_model_zoo/models/im2txt/im2txt/ops/image_embedding_test.py tf_model_zoo/models/differential_privacy/dp_sgd/dp_mnist/dp_mnist.py tf_model_zoo/models/slim/nets/inception_v3.py tf_model_zoo/models/slim/nets/vgg.py tf_model_zoo/models/inception/inception/image_processing.py tf_model_zoo/models/inception/inception/slim/ops.py video_records/epickitchens55_record.py tf_model_zoo/models/slim/nets/inception_utils.py tf_model_zoo/models/textsum/data_convert_example.py tf_model_zoo/models/neural_programmer/nn_utils.py tf_model_zoo/models/syntaxnet/syntaxnet/parser_eval.py tf_model_zoo/models/slim/nets/resnet_utils.py tf_model_zoo/models/autoencoder/autoencoder_models/VariationalAutoencoder.py tf_model_zoo/models/slim/datasets/download_and_convert_flowers.py tf_model_zoo/models/im2txt/im2txt/inference_utils/vocabulary.py tf_model_zoo/models/inception/inception/slim/variables.py tf_model_zoo/models/im2txt/im2txt/evaluate.py tf_model_zoo/models/differential_privacy/multiple_teachers/train_teachers.py dataset.py tf_model_zoo/models/differential_privacy/privacy_accountant/python/gaussian_moments.py tf_model_zoo/models/im2txt/im2txt/ops/inputs.py tf_model_zoo/models/street/python/vgslspecs_test.py preprocessing_epic/extract_audio.py tf_model_zoo/models/slim/nets/inception_v4_test.py tf_model_zoo/models/slim/nets/inception_resnet_v2_test.py tf_model_zoo/models/slim/datasets/download_and_convert_cifar10.py tf_model_zoo/models/im2txt/im2txt/inference_utils/caption_generator_test.py tf_model_zoo/models/slim/datasets/cifar10.py tf_model_zoo/models/im2txt/im2txt/ops/image_processing.py tf_model_zoo/bninception/caffe_pb2.py tf_model_zoo/models/differential_privacy/privacy_accountant/tf/accountant.py preprocessing_epic/symlinks.py tf_model_zoo/models/autoencoder/Utils.py tf_model_zoo/models/textsum/batch_reader.py tf_model_zoo/models/transformer/tf_utils.py tf_model_zoo/models/autoencoder/autoencoder_models/DenoisingAutoencoder.py tf_model_zoo/models/slim/preprocessing/vgg_preprocessing.py tf_model_zoo/models/syntaxnet/syntaxnet/beam_reader_ops_test.py tf_model_zoo/models/swivel/text2bin.py tf_model_zoo/models/street/python/vgsl_train.py tf_model_zoo/models/transformer/spatial_transformer.py tf_model_zoo/models/textsum/seq2seq_attention.py multimodal_gating.py tf_model_zoo/models/differential_privacy/multiple_teachers/analysis.py tf_model_zoo/models/syntaxnet/syntaxnet/structured_graph_builder.py tf_model_zoo/models/differential_privacy/dp_sgd/per_example_gradients/per_example_gradients.py fuse_results_epic.py tf_model_zoo/models/slim/nets/inception_v4.py tf_model_zoo/models/inception/inception/flowers_train.py tf_model_zoo/models/slim/nets/inception_v2.py tf_model_zoo/models/inception/inception/inception_train.py tf_model_zoo/models/swivel/nearest.py tf_model_zoo/bninception/parse_caffe.py tf_model_zoo/models/namignizer/data_utils.py tf_model_zoo/models/neural_programmer/parameters.py opts.py tf_model_zoo/models/slim/datasets/dataset_utils.py tf_model_zoo/inceptionresnetv2/pytorch_load.py tf_model_zoo/models/slim/nets/inception_v3_test.py tf_model_zoo/models/slim/deployment/model_deploy_test.py ops/__init__.py tf_model_zoo/models/inception/inception/imagenet_train.py tf_model_zoo/models/street/python/decoder_test.py tf_model_zoo/models/slim/nets/overfeat_test.py tf_model_zoo/models/neural_gpu/data_utils.py submission_json.py tf_model_zoo/models/lm_1b/lm_1b_eval.py tf_model_zoo/models/inception/inception/slim/inception_model.py tf_model_zoo/models/street/python/shapes.py tf_model_zoo/models/slim/nets/resnet_v1.py tf_model_zoo/models/differential_privacy/multiple_teachers/deep_cnn.py tf_model_zoo/models/namignizer/model.py tf_model_zoo/models/im2txt/im2txt/data/build_mscoco_data.py tf_model_zoo/models/neural_programmer/wiki_data.py tf_model_zoo/models/street/python/vgsl_model.py tf_model_zoo/models/video_prediction/prediction_input.py tf_model_zoo/models/resnet/resnet_model.py tf_model_zoo/models/neural_gpu/neural_gpu.py tf_model_zoo/models/swivel/vecs.py tf_model_zoo/models/neural_programmer/data_utils.py tf_model_zoo/models/neural_programmer/model.py tf_model_zoo/models/slim/nets/resnet_v1_test.py tf_model_zoo/models/slim/nets/cifarnet.py tf_model_zoo/models/differential_privacy/multiple_teachers/metrics.py tf_model_zoo/models/slim/nets/inception_resnet_v2.py tf_model_zoo/models/street/python/decoder.py tf_model_zoo/models/slim/datasets/download_and_convert_mnist.py tf_model_zoo/models/slim/preprocessing/inception_preprocessing.py tf_model_zoo/models/namignizer/names.py tf_model_zoo/models/slim/datasets/dataset_factory.py tf_model_zoo/models/slim/nets/alexnet.py tf_model_zoo/models/resnet/cifar_input.py tf_model_zoo/models/slim/nets/nets_factory.py tf_model_zoo/models/inception/inception/slim/losses.py tf_model_zoo/models/street/python/shapes_test.py tf_model_zoo/models/compression/msssim.py ops/utils.py tf_model_zoo/models/inception/inception/data/build_image_data.py tf_model_zoo/models/im2txt/im2txt/show_and_tell_model_test.py tf_model_zoo/models/syntaxnet/syntaxnet/graph_builder.py tf_model_zoo/models/street/python/vgsl_input.py tf_model_zoo/models/inception/inception/data/preprocess_imagenet_validation_data.py tf_model_zoo/models/resnet/resnet_main.py tf_model_zoo/models/transformer/cluttered_mnist.py tf_model_zoo/models/inception/inception/flowers_data.py tf_model_zoo/models/differential_privacy/multiple_teachers/train_student.py tf_model_zoo/models/slim/download_and_convert_data.py train.py tf_model_zoo/models/inception/inception/inception_distributed_train.py tf_model_zoo/models/compression/encoder.py tf_model_zoo/models/inception/inception/imagenet_data.py tf_model_zoo/models/differential_privacy/multiple_teachers/input.py fusion_classification_network.py tf_model_zoo/models/lm_1b/data_utils.py tf_model_zoo/models/differential_privacy/dp_sgd/dp_optimizer/dp_optimizer.py tf_model_zoo/models/autoencoder/MaskingNoiseAutoencoderRunner.py tf_model_zoo/models/inception/inception/data/build_imagenet_data.py tf_model_zoo/models/syntaxnet/syntaxnet/conll2tree.py tf_model_zoo/models/autoencoder/AdditiveGaussianNoiseAutoencoderRunner.py tf_model_zoo/models/inception/inception/data/process_bounding_boxes.py tf_model_zoo/models/slim/nets/nets_factory_test.py tf_model_zoo/models/syntaxnet/syntaxnet/lexicon_builder_test.py tf_model_zoo/models/video_prediction/prediction_model.py tf_model_zoo/models/syntaxnet/syntaxnet/parser_trainer.py tf_model_zoo/models/swivel/prep.py tf_model_zoo/models/inception/inception/slim/inception_test.py tf_model_zoo/models/inception/inception/inception_model.py tf_model_zoo/models/textsum/seq2seq_attention_decode.py tf_model_zoo/models/slim/datasets/mnist.py tf_model_zoo/models/inception/inception/slim/slim.py tf_model_zoo/inceptionresnetv2/tensorflow_dump.py tf_model_zoo/models/slim/nets/inception_v2_test.py tf_model_zoo/models/slim/preprocessing/lenet_preprocessing.py tf_model_zoo/models/slim/nets/inception_v1_test.py tf_model_zoo/models/syntaxnet/syntaxnet/graph_builder_test.py tf_model_zoo/__init__.py tf_model_zoo/models/syntaxnet/syntaxnet/reader_ops_test.py tf_model_zoo/models/im2txt/im2txt/run_inference.py tf_model_zoo/models/video_prediction/lstm_ops.py video_records/__init__.py tf_model_zoo/models/differential_privacy/dp_sgd/dp_optimizer/dp_pca.py tf_model_zoo/models/street/python/vgsl_model_test.py tf_model_zoo/bninception/pytorch_load.py tf_model_zoo/models/street/python/vgslspecs.py tf_model_zoo/models/textsum/beam_search.py tf_model_zoo/models/slim/preprocessing/cifarnet_preprocessing.py tf_model_zoo/models/swivel/glove_to_shards.py ops/basic_ops.py tf_model_zoo/models/im2txt/im2txt/inference_wrapper.py models.py tf_model_zoo/models/inception/inception/slim/variables_test.py video_records/video_record.py transforms.py tf_model_zoo/models/inception/inception/imagenet_eval.py Gated_Embedding_Unit Context_Gating TBNDataSet main softmax fuse_scores Fusion_Classification_Network TBN Multimodal_Gated_Unit top_scores dump_scores_to_json compute_score_dicts action_scores_to_json compute_action_scores softmax main scores_to_json to_json save_scores average_crops eval_video print_accuracy main evaluate_model validate multitask_accuracy AverageMeter accuracy save_checkpoint main train Stack IdentityTransform GroupCenterCrop GroupNormalize GroupOverSample ToTorchFormatTensor GroupScale GroupRandomSizedCrop GroupRandomHorizontalFlip GroupRandomCrop GroupMultiScaleCrop ConsensusModule SegmentConsensus Identity softmax class_accuracy log_add get_grad_hook ffmpeg_extraction read_and_resample ReductionParameter ROIPoolingParameter HingeLossParameter BatchReductionParameter BlobProto BlobProtoVector NetStateRule LayerParameter PowerParameter FillerParameter ArgMaxParameter SegDataParameter InnerProductParameter V0LayerParameter ConvolutionParameter SolverState EltwiseParameter LossParameter SliceParameter WindowDataParameter DummyDataParameter HDF5OutputParameter TanHParameter TransformationParameter SoftmaxParameter ConcatParameter DataParameter SPPParameter ParamSpec SolverParameter MVNParameter ContrastiveLossParameter NetState NetParameter BiasParameter PoolingParameter DropoutParameter Datum VideoDataParameter SigmoidParameter BlobShape ExpParameter AccuracyParameter LogParameter ThresholdParameter MemoryOptimizationParameter MemoryDataParameter BNParameter LRNParameter ImageDataParameter ReLUParameter ReshapeParameter InfogainLossParameter ScaleParameter V1LayerParameter HDF5DataParameter PReLUParameter FlattenParameter PythonParameter build_relu build_bn build_pooling build_linear build_dropout build_conv get_basic_layer parse_expr CaffeVendor InceptionV3 BNInception test_block35 load_conv2d_nobn load_block8 Mixed_6a test_conv2d inceptionresnetv2 load_block17 InceptionResnetV2 test_mixed_7a test_conv2d_nobn Mixed_5b load_linear test_mixed_5b test_mixed_6a test_block17 load_mixed_6a load_mixed_7a test BasicConv2d load_block35 Block35 load Block17 Block8 load_mixed_5b Mixed_7a test_block8 load_conv2d dump_block17 dump_mixed_6a dump_logits dump_block35 dump_mixed_5b dump_conv2d dump_block8 dump_mixed_7a dump_conv2d_nobn make_padding Mixed_4a test_conv2d load_mixed_7 load_mixed_4a_7a load_mixed_5 Mixed_5a load_linear Inception_C InceptionV4 Reduction_B load_mixed_6 test BasicConv2d test_mixed_4a_7a Reduction_A load Inception_B Inception_A Mixed_3a inceptionv4 load_conv2d dump_mixed_5 dump_mixed_7 dump_logits dump_mixed_4a_7a dump_conv2d make_padding dump_mixed_6 get_random_block_from_data standard_scale get_random_block_from_data standard_scale get_random_block_from_data standard_scale xavier_init min_max_scale get_random_block_from_data Autoencoder AdditiveGaussianNoiseAutoencoder MaskingNoiseAutoencoder VariationalAutoencoder main get_output_tensor_names get_input_tensor_names main get_output_tensor_names main _SSIMForMultiScale MultiScaleSSIM _FSpecialGauss main Eval MnistInput Train DPGradientDescentOptimizer ComputeDPPrincipalProjection AmortizedGaussianSanitizer NetworkParameters BuildNetwork SoftThreshold GenerateBinomialTable LayerParameters VaryRate BatchClipByL2norm GetTensorOpName ConvParameters AddGaussianNoise Conv2DPXG MatMulPXG Interface AddPXG PerExampleGradients PXGRegistry _ListUnion aggregation_most_frequent labels_from_probs noisy_max logmgf_exact compute_q_noisy_max smoothed_sens compute_q_noisy_max_approx main logmgf_from_counts sens_at_k train_op_fun loss_fun _input_placeholder train inference_deeper inference _variable_with_weight_decay _variable_on_cpu softmax_preds moving_av ld_svhn extract_mnist_labels partition_dataset ld_mnist unpickle_cifar_dic create_dir_if_needed image_whitening ld_cifar10 extract_mnist_data extract_svhn extract_cifar10 maybe_download accuracy main ensemble_preds train_student prepare_student_data main train_teacher batch_indices integral_bounded_mp integral_inf_mp _compute_delta compute_log_moment compute_b_mp cropped_ratio distributions distributions_mp _to_np_float64 _compute_eps compute_b pdf_gauss_mp integral_bounded pdf_gauss compute_a_mp get_privacy_spent integral_inf compute_a GaussianMomentsAccountant AmortizedAccountant MomentsAccountant DummyAccountant TrainingConfig ModelConfig main run_once evaluate_model run InferenceWrapper main ShowAndTellModel ShowAndTellModelTest ShowAndTellModel main _process_dataset _process_image_files _int64_feature Vocabulary _bytes_feature_list _create_vocab _load_and_process_metadata _process_caption _bytes_feature ImageDecoder _to_sequence_example main _int64_feature_list Caption TopN CaptionGenerator FakeVocab CaptionGeneratorTest FakeModel InferenceWrapperBase Vocabulary inception_v3 InceptionV3Test process_image distort_image parse_sequence_example batch_with_dynamic_pad prefetch_input_data Dataset FlowersData main main ImagenetData main main main image_preprocessing batch_inputs inputs parse_example_proto distorted_inputs distort_color eval_image decode_jpeg distort_image train evaluate _eval_once inference _activation_summaries loss _activation_summary train _average_gradients _tower_loss ImageCoder _convert_to_example _process_image_files _process_image _int64_feature _process_dataset _is_cmyk _find_image_files _build_bounding_box_lookup _find_human_readable_labels _build_synset_lookup _find_image_bounding_boxes _bytes_feature _float_feature main _process_image_files_batch _is_png ImageCoder _convert_to_example _process_image_files _process_dataset _int64_feature _find_image_files _bytes_feature _is_png main _process_image_files_batch _process_image BoundingBox FindNumberBoundingBoxes GetInt ProcessXMLAnnotation GetItem get_variables_by_name get_variables CollectionsTest inception_v3 inception_v3_parameters InceptionTest l2_regularizer cross_entropy_loss l1_loss l1_l2_regularizer l1_regularizer l2_loss RegularizersTest LossesTest CrossEntropyLossTest one_hot_encoding batch_norm dropout fc max_pool _two_element_tuple conv2d flatten repeat_op avg_pool FCTest ConvTest FlattenTest DropoutTest OneHotEncodingTest AvgPoolTest BatchNormTest MaxPoolTest _current_arg_scope _add_op add_arg_scope _get_arg_stack arg_scope has_arg_scope func2 func1 ArgScopeTest variable_device global_step variable get_unique_variable get_variables_by_name add_variable get_variables_to_restore VariableDeviceChooser get_variables VariablesTest GetVariablesByNameTest GlobalStepTest CharsVocabulary LM1BDataset get_batch Vocabulary _SampleModel _SampleSoftmax _LoadModel _DumpSentenceEmbedding main _DumpEmb _EvalModel read_names _letter_to_number name_to_batch namignizer_iterator NamignizerModel decode init_data get_batch to_symbol accuracy to_id add pad print_out safe_exp tanh_cutoff quantize NeuralGPU sigmoid_cutoff relaxed_distance check_for_zero conv_linear conv_gru quantize_weights_op _custom_id_grad relaxed_average make_dense initialize animate multi_test evaluate single_test main train interactive exact_match complete_wiki_processing perform_word_cutoff word_dropout word_lookup get_max_entry generate_feed_dict convert_to_int_2d_and_pad pick_one add_special_words construct_vocab partial_match partial_column_match convert_to_bool_and_pad group_by_max exact_column_match return_index check_processed_cols list_join Graph LSTMCell apply_dropout get_embedding Parameters WikiExample simple_normalize TableInfo is_number WikiQuestionLoader WikiQuestionGenerator final_normalize correct_unicode is_date is_nan_or_inf full_normalize strip_accents build_input main train evaluate ResNet main main _configure_learning_rate _configure_optimizer _get_init_fn main _add_variables_summaries _get_variables_to_train get_split get_dataset download_and_uncompress_tarball image_to_tfexample write_label_file int64_feature bytes_feature read_label_file has_labels _add_to_tfrecord _download_and_uncompress_dataset _get_output_filename _clean_up_temporary_files run _dataset_exists _convert_dataset run _clean_up_temporary_files _get_filenames_and_classes _get_dataset_filename ImageReader _add_to_tfrecord _extract_labels _get_output_filename _download_dataset _extract_images _clean_up_temporary_files run get_split get_split create_readable_names_for_imagenet_labels get_split _gather_clone_loss deploy _add_gradients_summaries _optimize_clone create_clones optimize_clones DeploymentConfig _sum_clones_gradients DeploymentConfigTest DeployTest OptimizeclonesTest BatchNormClassifier CreatecloneTest LogisticClassifier alexnet_v2 alexnet_v2_arg_scope AlexnetV2Test cifarnet_arg_scope cifarnet inception_resnet_v2_arg_scope inception_resnet_v2 block8 block35 block17 InceptionTest inception_arg_scope inception_v1_base inception_v1 InceptionV1Test inception_v2_base _reduced_kernel_size_for_small_input inception_v2 InceptionV2Test inception_v3 _reduced_kernel_size_for_small_input inception_v3_base InceptionV3Test inception_v4 block_reduction_b inception_v4_base block_inception_b block_inception_c block_reduction_a block_inception_a InceptionTest lenet lenet_arg_scope get_network_fn NetworksTest overfeat overfeat_arg_scope OverFeatTest Block conv2d_same subsample resnet_arg_scope stack_blocks_dense resnet_v1_152 resnet_v1_101 bottleneck resnet_v1_200 resnet_v1_50 resnet_v1 ResnetUtilsTest ResnetCompleteNetworkTest create_test_input resnet_v2_50 resnet_v2_200 resnet_v2_101 resnet_v2_152 bottleneck resnet_v2 ResnetUtilsTest ResnetCompleteNetworkTest create_test_input vgg_16 vgg_arg_scope vgg_a vgg_19 VGG16Test VGGATest VGG19Test preprocess_image preprocess_for_train preprocess_for_eval distorted_bounding_box_crop preprocess_for_train preprocess_for_eval preprocess_image distort_color apply_with_random_selector preprocess_image get_preprocessing _aspect_preserving_resize preprocess_for_train _crop _central_crop _smallest_size_at_least _mean_image_subtraction preprocess_for_eval preprocess_image _random_crop Decoder DecoderTest _testdata ComputeErrorRates AddErrors CountWordErrors CountErrors ComputeErrorRate ErrorcounterTest lstm_layer _variable_lstm_shape _variable_lstm_grad rnn_helper rotate_dimensions tensor_dim transposing_reshape tensor_shape DataTest _rand ShapesTest VGSLSpecs _rand VgslspecsTest main _ImageProcessing ImageInput _ReadExamples VGSLImageModel _ParseInputSpec _PadLabels2d Train _ParseOutputSpec _PadLabels3d Eval _AddRateToSummary InitNetwork _rand VgslModelTest _testdata main make_shard_files main write_vocab_and_sums compute_coocs words create_vocabulary write_shards main count_matrix_input write_embeddings_to_disk embeddings_with_init SwivelModel write_embedding_tensor_to_disk main read_marginals_file go Vecs evaluate ParsingReaderOpsTest main to_dict GreedyParser BatchedSparseToDense EmbeddingLookupFeatures GraphBuilderTest LexiconBuilderTest main Eval RewriteContext OutputPath WriteStatus Train RewriteContext main Eval StageName ParsingReaderOpsTest AddCrossEntropy StructuredGraphBuilder TextFormatsTest Batcher BeamSearch Hypothesis Pad SnippetGen Ids2Words GetExFeatureText Vocab ToSentences ExampleGen GetWordIds main _binary_to_text _text_to_binary main _Train _RunningAvgLoss _Eval BSDecoder DecodeIO Seq2SeqAttentionModel _extract_argmax_and_embed sampled_sequence_loss sequence_loss_by_example linear transformer batch_transformer linear conv2d dense_to_one_hot bias_variable weight_variable basic_conv_lstm_cell init_state build_tfrecord_input construct_model scheduled_sample cdna_transformation stp_transformation dna_transformation main peak_signal_to_noise_ratio Model mean_squared_error EpicKitchens100_VideoRecord EpicKitchens55_VideoRecord VideoRecord reshape exp mean join list scores_root rgb spec flow fuse_scores read_pickle mkdir keys unravel_index reshape softmax top_scores append zip append zip mean scores_to_json compute_action_scores action_scores_to_json zip mkdir to_json compute_score_dicts str iterrows value_counts submission_json dump_scores_to_json test_timestamps div results_dir zeros sum enumerate to net modality test_crops load format new_length print to test_list Compose flow_prefix DataLoader load_state_dict read_pickle device TBN dataset TBNDataSet modality format print astype mean accuracy_score sum diag list keys array format save_scores print add_argument scores_file print_accuracy upper dirname ArgumentParser parse_args evaluate_model makedirs validate train_list IdentityTransform SGD MultiStepLR pretrained DataLoader save_checkpoint input_std device dataset max get_augmentation scale_size lr_steps squeeze GroupNormalize pretrained_flow epochs crop_size OrderedDict save_stats getattr load_state_dict freeze partialbn to modality CrossEntropyLoss freeze_fn range new_length Compose close start_epoch input_mean val_list resume lr TBN num_segments load items join evaluate flow_prefix isfile train step TBNDataSet model multitask_accuracy clip_grad_norm_ zero_grad clip_gradient len freeze to partialbn modality freeze_fn update format size item add_scalars enumerate time criterion backward print AverageMeter accuracy parameters step add_scalar copyfile join save makedirs topk size t eq mul_ expand_as append float sum max int topk sum zip float size add_ ByteTensor t eq cuda expand_as is_available ge type max append len astype confusion_matrix mean sum diag call load join print split parse_expr Conv2d MaxPool2d AvgPool2d load_url InceptionResnetV2 load_state_dict ones size File close from_numpy permute from_numpy File close permute t File close from_numpy load_conv2d load_conv2d_nobn load_conv2d load_conv2d load_conv2d_nobn load_conv2d load_conv2d load_conv2d_nobn load_conv2d load_block8 load_mixed_5b load_mixed_6a load_mixed_7a load_block35 load_block17 load_linear range load_conv2d transpose_ sum data ones print Variable File close dist mean from_numpy softmax imread forward std transpose_ register_forward_hook File close from_numpy transpose_ register_forward_hook File close from_numpy test_conv2d branch0 conv2d test_conv2d branch0 test_conv2d_nobn test_conv2d branch0 conv2d test_conv2d branch0 test_conv2d_nobn test_conv2d conv2d test_conv2d branch0 test_conv2d_nobn decode exit get_shape get_operation_by_name File system close eval create_dataset get_attr make_padding get_tensor_by_name get_shape get_operation_by_name File system close eval create_dataset get_attr make_padding get_tensor_by_name print get_operation_by_name File close eval create_dataset get_tensor_by_name dump_conv2d dump_conv2d dump_conv2d_nobn dump_conv2d dump_conv2d dump_conv2d_nobn dump_conv2d dump_conv2d dump_conv2d_nobn load_url load_state_dict InceptionV4 load_conv2d load_conv2d load_conv2d load_conv2d load_mixed_6 load_mixed_7 load_mixed_4a_7a load_mixed_5 eval zeros test_conv2d dump_conv2d dump_conv2d dump_conv2d dump_conv2d transform fit randint len sqrt transform fit append format range output_directory iteration MkDir append format range packbits asarray BytesIO reshape savez_compressed exp float64 reshape min astype mean shape _FSpecialGauss fftconvolve ones size _SSIMForMultiScale append array range MultiScaleSSIM placeholder string expand_dims decode_png read TFRecordReader string_input_producer reshape float32 cast parse_single_example shuffle_batch decode_png batch update batch_size hidden_layer_num_units projection_dimensions NetworkParameters eval_data_path save_path default_gradient_l2norm_bound num_hidden_layers Train num_training_steps LayerParameters ConvParameters training_data_path append self_adjoint_eig l2_normalize slice sanitize transpose reshape matmul shape top_k rsplit patch_size layer_parameters input_size with_bias weight_decay num_units projection_dimensions name matmul conv2d relu in_channels sqrt truncated_normal Variable reshape max_pool gradient_l2norm_bound num_outputs zeros bias_gradient_l2norm_bound conv_parameters zeros range append pop list isinstance inputs extend set OrderedDict append union pxg_rule list gradients zip Interface OrderedDict _ListUnion append pxg_registry shape argmax len int asarray labels_from_probs reshape shape bincount zeros argmax range int asarray labels_from_probs reshape shape bincount zeros argmax range argmax array exp argmax array len pow exp log compute_q_noisy_max print logmgf_from_counts sorted exp max sens_at_k input_is_counts log getcwd shape delta astype max_examples moments noise_eps maybe_download counts_file min indices_file int32 beta array mul add_to_collection _variable_on_cpu l2_loss truncated_normal_initializer lrn max_pool sparse_softmax_cross_entropy_with_logits int64 reduce_mean cast add_to_collection get_collection ExponentialMovingAverage apply int trainable_variables learning_rate batch_size name scalar_summary apply nb_teachers apply_gradients moving_av ExponentialMovingAverage exponential_decay float epochs_per_decay histogram_summary batch_size _input_placeholder inference_deeper deeper reset_default_graph softmax ExponentialMovingAverage Saver ceil inference variables_to_restore zeros len MakeDirs urlretrieve endswith print stat append ones print maximum mean sqrt shape std range len load close open unpickle_cifar_dic reshape extractall swapaxes save append data_dir hstack image_whitening vstack extract_svhn maybe_download data_dir image_whitening extract_cifar10 maybe_download data_dir extract_mnist_data extract_mnist_labels maybe_download int len argmax len str print deeper teachers_max_steps teachers_dir zeros range softmax_preds ld_svhn noisy_max str lap_scale ld_mnist print data_dir accuracy ld_cifar10 ensemble_preds softmax_preds str print accuracy prepare_student_data deeper max_steps train_dir ld_svhn str softmax_preds partition_dataset ld_mnist train_dir print accuracy ld_cifar10 deeper max_steps len int inf quad quad int format print binom ceil range format print distributions b_fn integral_bounded integral_inf log compute_a quad quad int integral_inf_mp format print distributions_mp ceil int integral_inf_mp format integral_bounded_mp print distributions_mp b_fn compute_a_mp ceil log exp min write float min write log assert_array_less compute_b_mp isinf compute_a_mp compute_a assert_allclose int time exp flush info batch_size add add_summary ceil num_eval_examples range Summary run latest_checkpoint checkpoint_dir info Graph MakeDirs info eval_dir run vocab_file Vocabulary Graph Glob len extend finalize input_files info split inception_checkpoint_file TrainingConfig input_file_pattern MakeDirs ModelConfig train_dir FeatureLists SequenceExample decode_jpeg Features int join arange TFRecordWriter print astype write SerializeToString close output_dir _to_sequence_example range flush len seed int Thread join print min astype shuffle Coordinator start num_threads ImageDecoder append range len update Vocabulary print sort Counter dict len word_tokenize extend lower end_word append join setdefault print ImageMetadata append int val_captions_file _process_dataset train_captions_file val_shards _create_vocab train_shards _load_and_process_metadata val_image_dir output_dir test_shards train_image_dir list l2_regularizer summarize_activation values resize_images random_crop mul resize_image_with_crop_or_pad image_summary convert_image_dtype sub distort_image parse_single_sequence_example enqueue fatal string_input_producer len FIFOQueue cast append range add_queue_runner size Glob info QueueRunner read extend float32 RandomShuffleQueue scalar_summary split batch_join slice ones reduce_max reduce_sum add reduce_mean sub append expand_dims reduce_min scalar_summary eval_dir Exists DeleteRecursively FlowersData Server ClusterSpec ImagenetData target batch_size batch_size mul decode_jpeg sub eval_image image_size distort_image update concat transpose cast VarLenFeature parse_single_example expand_dims values num_replicas_to_aggregate _activation_summaries value batch_size reshape concat sparse_to_dense cross_entropy_loss range name zero_fraction sub scalar_summary histogram_summary REGULARIZATION_LOSSES name get_collection apply average add_n ExponentialMovingAverage sub TOWER_NAME inference LOSSES_COLLECTION loss scalar_summary concat reduce_mean zip append expand_dims Example print _is_cmyk cmyk_to_rgb png_to_jpeg _is_png decode_jpeg int join _convert_to_example arange _process_image TFRecordWriter print astype write SerializeToString close output_directory range flush len ImageCoder Thread Coordinator start append seed list print Glob extend shuffle range len append append basename print _process_image_files _find_image_files _find_human_readable_labels _find_image_bounding_boxes labels_file readlines split print readlines append float split imagenet_metadata_file train_directory _build_bounding_box_lookup validation_directory _build_synset_lookup bounding_box_file validation_shards labels_file iter BoundingBox parse height ymin FindNumberBoundingBoxes min ymax xmin xmax GetInt getroot width append float max range GetItem get_shape assert_is_compatible_with get_shape TensorShape isinstance num_elements pop add_to_collection get_collection _get_arg_stack add update append copy isinstance _add_op append add_to_collection get_collection VARIABLES name NodeDef callable device GLOBAL_STEP get_collection append list set list ones min float32 int32 zeros next range len exp get_batch ckpt _LoadModel error write isnan eval pbtxt enumerate run _SampleSoftmax ckpt ones _LoadModel word_to_char_ids id_to_word write float32 num_samples int32 zeros range pbtxt run ckpt ones _LoadModel reshape size write float32 int32 zeros save_dir range pbtxt run join ckpt ones _LoadModel len write float32 int32 zeros save_dir range pbtxt run _SampleModel sentence input_data CharsVocabulary prefix _DumpSentenceEmbedding LM1BDataset _DumpEmb _EvalModel namedtuple tolist lower sum array read_csv list reshape map choice zeros sum range zeros list map reshape append max range len time rand_pair rand_dup_pair rand_kvsort_pair rand_rev2_pair spec print_out append float range rand_search_pair choice pad append array write flush decode task_print min range exp sigmoid tanh conv_lin sigmoid_cutoff tanh minimum maximum add_n range len append trainable_variables assign relaxed_average init_data kh noclass MkDir set_random_seed kw max_grad_norm forward_max uniform_unit_scaling_initializer max run seed restore niclass rx_step print_out curriculum_bound append initialize_all_variables cutoff range max_length train_dir nconvs height pull dropout get_checkpoint_state NeuralGPU lr set_initializer random_seed pull_incr join jobid min model_checkpoint_path mode nmaps split restore get_batch accuracy print_out append float step min print_out single_test low_batch_size float max range split batch_size zeros_like set_xticklabels text set_yticks grid add_axes imshow set_zorder set_xticks figure save append range FuncAnimation split batch_size interactive range len number_columns deepcopy isinstance Number question word_column_names word_columns append word_ids number_column_names len dummy_token max_entry_length append range len tolist max_elements range len append range len append range len append range len append range len append get_max_entry range len range len exact_match number_lookup_matrix word_exact_match float64 original_nc_names word_print_answer word_group_by_max calc_answer column_names number_columns sorted columns list unk_token ones tolist max_number_cols column_match_token max_entry_length word_columns convert_to_int_2d_and_pad entry_match_token append ordinal_question number_print_answer word_lookup_matrix range number_group_by_max string_question replace original_nc original_wc_names question_attention_mask original_wc partial_match question max_word_cols max_elements ordinal_question_one number_column_exact_match partial_column_match number_column_names is_lookup group_by_max convert_to_bool_and_pad exact_column_match question_length check_processed_cols number_exact_match word_column_names word_column_exact_match zeros is_bad_example len unk_token print entry_match_token column_match_token dummy_token append word_ids len pop remove keys list append range len append reshape range dropout sigmoid tanh bias_add matmul str join strip_accents strip sub correct_unicode sub final_normalize simple_normalize strip sub lower strip float range len concat enqueue image_summary string_input_producer resize_image_with_crop_or_pad transpose FIFOQueue cast range sparse_to_dense per_image_whitening random_crop add_queue_runner random_flip_left_right slice Glob QueueRunner FixedLengthRecordReader read decode_raw uint8 reshape float32 dequeue_many int32 RandomShuffleQueue Stop build_graph dataset argmax Summary run prepare_or_wait_for_session add Supervisor train_dir SummaryWriter build_input ResNet mean info flush train_data_path add_summary mode build_graph eval_dir Saver dataset argmax max Session Summary run eval_once restore eval_batch_count add sleep range start_queue_runners SummaryWriter build_input eval_data_path get_checkpoint_state ResNet info log_root flush model_checkpoint_path add_summary mode HParams dataset_dir set_verbosity INFO int sync_replicas num_epochs_per_decay batch_size MomentumOptimizer AdagradOptimizer GradientDescentOptimizer AdamOptimizer RMSPropOptimizer AdadeltaOptimizer FtrlOptimizer name get_model_variables append scalar_summary histogram_summary checkpoint_path latest_checkpoint get_model_variables checkpoint_exclude_scopes IsDirectory startswith info append train_dir extend get_collection TRAINABLE_VARIABLES join TFRecordReader TFExampleDecoder read_label_file has_labels join urlretrieve print extractall stat join join index split reshape join urlretrieve print extractall stat join Remove DeleteRecursively download_and_uncompress_tarball list print _get_output_filename write_label_file dict zip _clean_up_temporary_files range len append join listdir isdir int write ceil float flush len _get_dataset_filename range seed shuffle _dataset_exists _convert_dataset _get_filenames_and_classes print print _extract_images _extract_labels print join urlretrieve _download_dataset format urlretrieve readlines len split create_readable_names_for_imagenet_labels write_label_file scope scalar_summary _gather_clone_loss REGULARIZATION_LOSSES get_collection add_n _sum_clones_gradients len SUMMARIES get_collection set scope create_clones UPDATE_OPS append add_n zip global_norm isinstance name IndexedSlices info append values histogram_summary batch_norm as_list prediction_fn hasattr default_image_size pad to_float random_crop random_flip_left_right image_summary random_brightness pad random_contrast expand_dims to_float resize_image_with_crop_or_pad expand_dims image_summary random_uniform to_float resize_image_with_crop_or_pad sub div pack greater_equal slice to_int32 logical_and with_dependencies Assert shape rank equal greater_equal reshape logical_and with_dependencies extend Assert shape rank random_uniform append range equal len append _crop range split convert_to_tensor to_float to_int32 greater cond convert_to_tensor resize_bilinear squeeze shape set_shape _smallest_size_at_least expand_dims _aspect_preserving_resize set_shape random_uniform set_shape _aspect_preserving_resize subtract sum Counter test_count fn truth_count fp merge_with with_rank list range tensor_shape get_shape rotate_dimensions reshape transpose len get_shape append tensor_dim range len num_steps eval_interval_secs decoder graph_def_file model_str eval_data Eval batch_join sparse_tensor_to_dense string_input_producer batch_size reshape Glob identity image_summary int64 cast _ReadExamples deserialize_many_sparse int32 append range read TFRecordReader reader serialize_sparse reshape parse_single_example _ImageProcessing mul float32 sub set_shape cast decode_png ReplicaDeviceSetter startswith ErrorRates Decoder Build rfind VGSLImageModel find tensor_shape reshape _PadLabels2d int match group compile int match group compile Summary add_summary task ps_tasks initial_learning_rate master num_preprocess_threads learning_rate_halflife final_learning_rate optimizer_type train_data max_steps join read pack seek SEEK_END shard_size print tell size write SEEK_SET any unpack output_dir range flush open shard_size max_vocab seek SEEK_END setdefault print tell sort words write SEEK_SET min len flush enumerate join seek SEEK_END setdefault shard_size flush_coocs tell min write SEEK_SET enumerate window_size output_dir open range flush len join read items seek shard_size name sort write close unlink Example output_dir range flush len vocab write_vocab_and_sums write_shards read string_input_producer reshape concat WholeFileReader parse_single_example batch sparse_to_dense values run row_embedding print col_embedding input_base_path output_base_path write_embedding_tensor_to_disk flush output_base_path spearmanr list _get_dict OrderedDict append token range len fill float32 constant diag convert_to_tensor embedding_lookup concat unpack_sparse_features join TaskSpec file_pattern resource_dir input part slim_model document_sink batch_size GreedyParser StructuredGraphBuilder string values run list restore len map placeholder feature_size resource_dir info model_path AddEvaluation time AddSaver task_context RewriteContext split OutputPath name add join OutputPath WriteStatus save max output_path slim_model GreedyParser StructuredGraphBuilder word_embeddings report_every Eval values run list AddTraining name node map append pretrained_params OutputPath info AddEvaluation time AddSaver AddPretrainedEmbeddings output_path split projectivize_training_set OutputPath compute_lexicon RewriteContext slice reshape cond append range glob read shuffle open len append WordToId split index len SnippetGen join in_file read feature FromString write close out_file append open pack readlines SerializeToString extend len write close Example out_file open split _binary_to_text _text_to_binary min write add add_summary Summary build_graph eval_dir Saver Session restore tolist sleep train_dir eval_interval_secs SummaryWriter NextBatch get_checkpoint_state info log_root flush join Ids2Words run_eval_step model_checkpoint_path add_summary _RunningAvgLoss vocab_path beam_size abstract_key max_abstract_sentences BSDecoder Seq2SeqAttentionModel max_article_sentences _Eval Batcher set_random_seed data_path _replace DecodeLoop _Train Vocab article_key random_seed as_list zeros random_normal zeros array arange state_initializer dtype pack set_shape list init_state use_state batch_size concat floor set_shape parse_single_example str TFRecordReader string_input_producer data_dir resize_image_with_crop_or_pad cast append range Glob decode_jpeg batch join int read reshape min resize_bicubic train_val_split float32 sequence_length zeros len to_float exp to_int32 int32 zip bool round array convert_to_tensor fully_connected float32 transformer append array range int relu fully_connected reshape squeeze concat depthwise_conv2d reduce_sum tile zip append expand_dims split int relu slice concat reduce_sum pad append expand_dims range gather int range random_shuffle Saver save restore get_collection event_log_dir initialize_all_variables start_queue_runners SummaryWriter flush InteractiveSession num_iterations pretrained_model add_summary VARIABLES
# Temporal Binding Network This repository implements the model proposed in the paper: Evangelos Kazakos, Arsha Nagrani, Andrew Zisserman, Dima Damen, <strong>EPIC-Fusion: Audio-Visual Temporal Binding for Egocentric Action Recognition</strong>, <em>ICCV</em>, 2019 [Project's webpage](https://ekazakos.github.io/TBN/) [ArXiv paper](https://arxiv.org/abs/1908.08498) ## Citing When using this code, kindly reference: ``` @InProceedings{kazakos2019TBN, author = {Kazakos, Evangelos and Nagrani, Arsha and Zisserman, Andrew and Damen, Dima},
1,993
ekinakyurek/compgen
['morphological analysis', 'data augmentation']
['Learning to Recombine and Resample Data for Compositional Generalization']
data/vocab.py data/prep.py permutation load_file build_stratified main build_dataset Vocab update sorted permutation print set load_file join decode sorted print min tolist shuffle set build_stratified append enumerate len build_dataset range
# Learning to Recombine and Resample Data for Compositional Generalization Paper: [Learning To Recombine and Resample Data For Compositional Generalization](https://arxiv.org/pdf/2010.03706.pdf) Ekin Akyürek, Afra Feyza Akyürek, Jacob Andreas (2020) ![Recombination Model](./recomb.png "Recomb Network") ## Dependencies - **OS**: Linux or macOS - **Language**: Julia 1.2.0 (if not available, the setup script will automatically install a local copy.) - **Hardware**: NVIDIA GPU (that supports CUDA and cuDNN), with network connection, 3GB disk space including Julia installation. (we only tested with 32GB V100s) - **Libraries**: CUDA Runtime Library and cuDNN Developer Toolkits (tested with CUDA: 10.1.105_418.39 and cuDNN: 7.5.0) - If you don't have them, you might get a warning about GPU functionality which means you are not able to run the code with a GPU. If this is the case, _follow the [instructions](https://stackoverflow.com/a/47503155)_ by using the below download links selecting the abovementioned versions. This is a local installation and will not affect your system.
1,994
ektas0330/cell-segmentation
['semantic segmentation']
['Deep Learning-Based Semantic Segmentation of Microscale Objects']
losses.py snapshot_update_per_epoch.py augmented_75k/pre_processing.py swa.py augmented_75k/train_unet_xception_resnetblock.py gen_img_aug.py normalized_optimizer_wrapper.py augmented_75k/get_contour.py utils.py augmented_75k/predict_lovasz_loss.py chooseRotate chooseScale symmetric_lovasz_loss lovasz_grad flatten_binary_scores lovasz_hinge_flat iou_lovasz_multi lovasz_hinge lovasz_softmax_flat flatten_probas lovasz_loss lovasz_softmax mean_iou get_iou_vector l2_norm OptimizerWrapper NormalizedOptimizer SnapshotModelCheckpoint SnapshotCallbackBuilder SWA adjust_gamma rotate_mirror_do windowed_subdivs pre_process recreate_from_subdivs rotate_mirror_undo largest_component_mask get_iou_vector RunningStats residual_block convolution_block generateData build_model randint scale rot90 flip sum range get_iou_vector range where lovasz_hinge lovasz_hinge cumsum concat reduce_sum lovasz_hinge_flat reduce_mean set_shape map_fn equal cond reshape boolean_mask not_equal reduce_mean map_fn lovasz_softmax_flat dtype lovasz_grad stop_gradient boolean_mask stack reduce_mean cast top_k append gather abs equal tensordot reshape transpose boolean_mask not_equal sqrt epsilon sum square LUT astype array adjust_gamma equalizeHist min array max append array append array int collect reshape pre_process shape append expand_dims array range predict merge print int range zeros zeros drawContours shape enumerate img_to_array print rint IMREAD_GRAYSCALE append imread array convolution_block concatenate output Model input residual_block Xception
# Deep Learning-Based Semantic Segmentation of Microscale Objects This is the source code for the deep learning model proposed in the paper [Deep Learning-Based Semantic Segmentation of Microscale Objects](https://arxiv.org/abs/1907.03576). A condensed version of the paper is published in the Proceedings of the [2019 International Conference on Manipulation, Automation, and Robotics at Small Scales](https://marss-conference.org/). ## Data Annotation Low contrast, bright-field images of multiple human endothelial cells and silica beads shown in the [paper](https://arxiv.org/abs/1907.03576) are considered. Segmentation labels for the images are created using [LabelMe](https://github.com/wkentaro/labelme). ## Implementation This code is tested on a workstation running Windows 10 operating system, equipped with a 3.7GHz 8 Core Intel Xeon W-2145 CPU, GPU ZOTAC GeForce GTX 1080 Ti, and 64 GB RAM. Implemented with: * Tensorflow-gpu 1.10.1 * Keras 2.2.4 * OpenCV 3.4.2
1,995
elbuco1/AttentionMechanismsTrajectoryPrediction
['motion prediction']
['What the Constant Velocity Model Can Teach Us About Pedestrian Motion Prediction']
src/data/helpers/helpers.py src/features/prepare_training_file.py src/models/models/spatial_attention.py src/models/models/cnn_mlp.py test_environment.py docs/conf.py src/models/datasets/datasets.py src/models/models/s2s_social_attention.py src/data/classes/digit_manager.py src/features/helpers/helpers.py src/visualization/classes/animation.py src/features/create_samples.py src/data/classes/pixel_meter_conversion.py src/features/classes/prepare_training.py src/models/net_training.py src/visualization/plot_metrics.py src/models/models/pretrained_vgg.py src/models/models/soft_attention.py src/data/classes/framerate_manager.py src/visualization/sample_animations.py src/data/preprocess_dataset.py src/data/extract_dataset.py src/models/classes/training_class.py src/models/net_samples.py src/models/models/rnn_mlp.py src/visualization/helpers/helpers_visualisation.py src/models/helpers/helpers_evaluation.py src/models/helpers/helpers_training.py setup.py src/models/net_evaluation.py src/models/models/cnn.py src/models/models/social_attention.py src/data/classes/dataset_extractor.py src/models/models/s2s_spatial_attention.py src/features/classes/prepare_samples_hdf5.py prepare_ssh.py main main main SddExtractor DigitManager FramerateManager Pixel2Meters get_offsets bb_intersection_over_union get_speed smooth_trajectory get_acceleration min_max_scale reindex_frames find_file_by_extension save_traj revert_min_max_scale augment_scene_list get_dir_names get_speeds get_accelerations extract_trajectories del_files_containing_string clip_scene extract_frames save_trajs remove_file main main PrepareSamplesHdf5 PrepareTraining get_offsets bb_intersection_over_union get_speed smooth_trajectory get_acceleration min_max_scale reindex_frames find_file_by_extension save_traj revert_min_max_scale augment_scene_list get_dir_names get_speeds get_accelerations extract_trajectories del_files_containing_string clip_scene extract_frames save_trajs remove_file NetTraining Hdf5Dataset CustomDataLoader get_data_loader spatial revert_scaling_evaluation accelerations_distance get_active_mask scene_mask get_speed social_conflicts conflicts spatial_distrib spatial_conflicts get_acceleration get_scene_dimensions get_distrib_conflicts spatial_hist fill_grid predict_naive get_distances_agents_frame convert_losses conflicts_frame types_ohe fde get_speeds ade cut_decimals get_accelerations predict_neighbors_disjoint get_scene_dimension speeds_distance apply_criterion get_grid get_distances_agents_interval load_data_loaders MaskedLoss plot_grad_flow ade_loss fde_loss offsets_to_trajectories CNN CNN_MLP customCNN customCNN2 customCNN1 Identity RNN_MLP decoderLSTM S2sSocialAtt encoderLSTM decoderLSTM encoderLSTM S2sSpatialAtt SocialAttention MultiHeadAttention Encoder LinearProjection SoftAttention EncoderLayer SpatialAttention ConvNet main main Animation Animate get_colors print major extract SddExtractor apply_conversions manage_framerate Pixel2Meters DigitManager manage_digit_number FramerateManager listdir euclidean append get_speed range len append range len append get_acceleration range len append lower sorted listdir remove exists get_dir_names remove_file rename remove_file append format append zip len remove_file extract_trajectories format print reindex_frames smooth_trajectory remove_file enumerate mean splev splrep float min max extract_scenes_hdf5 PrepareSamplesHdf5 create_training_file PrepareTraining subtract ones_like sum sqrt ones_like subtract sqrt zip append expand_dims sum array load revert_standardization revert_min_max_scale open reshape OneHotEncoder shape transform fit flatten LongTensor astype append Hdf5Dataset CustomDataLoader load format fillPoly astype argsort int32 append imread open arange view reshape roll shape stack zip append to array range net view reshape shape unsqueeze repeat expand_dims net load criterion copy mean append array open load emd_samples mean append open load fill_grid get_grid flatten mean zip minkowski append open int int zeros format cut_decimals get_scene_dimension shape imread array load spatial_conflicts scene_mask open array len load conflicts copy mean array open append array range conflicts_frame ones_like float astype eye distance_matrix triu sum len load wasserstein_distance copy get_distances_agents_interval array open flatten distance_matrix get_distances_agents_frame array range load get_speeds wasserstein_distance open load wasserstein_distance get_accelerations get_speeds open Hdf5Dataset CustomDataLoader ones_like mse MSELoss sqrt sum ones_like view size mse MSELoss sqrt stack zip append sum subplots arange grid max list set_title set_yscale set_xlabel bar savefig legend append hlines range format set_xticklabels close tight_layout mean time set_xticks set_ylabel len print add subplots arange open str set_title bar scatter savefig legend append range format plot set_xticklabels close tight_layout set mean zip float load int set_xticks array len Animation animate_sample int arange concatenate shuffle len
# Study of attention mechanisms for trajectory prediction in Deep Learning ## Overview ### Problem definition This project addresses the task of predicting future trajectories of interacting agents in a scene. We refer to this problem as trajectory prediction. The trajectory prediction task works as follows: given the past observed trajectory of an agent (pedestrian, cyclist, driver ...) we want to predict the future trajectory of the agent, i.e. the ordered next positions it will cross in the future. In the litterature, the prediction task is commonly tackled for 8 observed positions and 12 predicted positions. The time between two positions being 0.4s, we observe an agent moving during 3.2s and predict its movement for the next 4.8s. <div align='center'> <img src="images/problem_def.png"></img> </div> #### Naïve prediction We refer to this task as naïve prediction when the only information used to predict an agent's future path is its past observed trajectory. This naïve prediction is most of the time tackled using deep learning models such as LSTM-MLP or sequence-to-sequence LSTM. In the sequence-to-sequence LSTM model, the first LSTM (encoder) takes as input the observed trajectory and extracts recursively a fixed-size representation of it. Using this representation, the second LSTM (decoder) predicts recursively the future positions of the agent. By recursively, we mean that it first predicts the next position and then uses it to make the following prediction and so on. <div align='center'>
1,996
elisaF/news-med-segmentation
['discourse segmentation']
['From News to Medical: Cross-domain Discourse Segmentation']
code/parse_predicted.py code/evaluate_segmentation.py code/parse_gold.py read_tokens check_lengths get_counts evaluate_predictions evaluate_edus get_files main parse_rs3 parse_edu_stanford parse_edu_spacy main parse_edu_dplp parse_edu_feng list keys get_files list keys len evaluate_edus list format print repr set zip append float keys enumerate len parse_rs3 parse_edu_stanford parse_edu_spacy endswith join listdir endswith join listdir load endswith listdir parse_edu_dplp parse_edu_feng items list rstrip defaultdict join endswith append listdir split endswith listdir
# News to Medical EDU Segmentation This repository includes: * a corpus of medical articles segmeted into EDUs, [following these guidelines](https://www.isi.edu/~marcu/discourse/tagging-ref-manual.pdf) (from RST-DT) * code for preprocessing, postprocessing, evaluation Please cite our [NAACL DISRPT Workshop paper](https://www.aclweb.org/anthology/W19-2704) as: ``` @inproceedings{ferracane-etal-2019-news, title = "From News to Medical: Cross-domain Discourse Segmentation", author = "Ferracane, Elisa and Page, Titan and
1,997
elisaF/structured
['text classification']
['Evaluating Discourse in Structured Text Representations']
data_structure.py postprocess/processed_doc_stats.py neural.py cli.py postprocess/sentiment.py postprocess/prune_docs.py corpora/create_writing_quality_corpus.py postprocess/setup.py utils.py postprocess/dependency_tree.py preprocess_edus.py corpora/create_mfc_corpus.py postprocess/attention_agreement.py corpora/add_id.py main.py postprocess/postprocess.py corpora/create_processsed_file_congressional_votes.py remove_filtered.py models.py prepare_data.py predictor.py postprocess/ppmi_words.py postprocess/rstdependency.py postprocess/rstnode.py main DataSet Instance ProcessedDoc strip_accents Corpus RawData save_model evaluate evaluate_pretrained_model get_git_revision_hash load_data run StructureModel get_structure MLP LReLu dynamicBiRNN InMemoryClient main _parse_edus get_alltreefiles get_docdict write_docs Document parse_fname main load_labels DocFilterer Data Instance Initializer load_dict save_dict grouper Corpus add_id create_corpus write_partitions create_partitions read_corpus create_file _get_file_names make_dict create_paired_dict get_paired_files make_dir prepare_for_parse create_data_splits create_corpus write_files _get_file_names get_root_agreement Edge calculate_tree DependencyTree tokenizeText calculate_ppmi get_word_counts_and_index get_highest_ppmi get_words lookup_value entropy_for_parents get_stats_rst get_stats get_arc_length get_parent_entropy get_leaf_proportion RSTNode _fix_lines parse_gcrf_output hu_liu_sentiment vader_sentiment calculate_sentiment main DataSet Instance ProcessedDoc strip_accents Corpus RawData save_model evaluate evaluate_pretrained_model get_git_revision_hash load_data run StructureModel get_structure MLP LReLu dynamicBiRNN InMemoryClient main _parse_edus get_alltreefiles get_docdict write_docs Document parse_fname load_labels DocFilterer Data Instance Initializer load_dict save_dict grouper Corpus add_id create_corpus write_partitions create_partitions read_corpus create_file _get_file_names make_dict create_paired_dict get_paired_files make_dir prepare_for_parse create_data_splits create_corpus write_files get_root_agreement Edge calculate_tree DependencyTree tokenizeText calculate_ppmi get_word_counts_and_index get_highest_ppmi get_words lookup_value entropy_for_parents get_stats_rst get_stats get_arc_length get_parent_entropy get_leaf_proportion RSTNode _fix_lines parse_gcrf_output hu_liu_sentiment vader_sentiment calculate_sentiment m parse_args gpu load get_batches batch_size sort data_file dict epochs open get_feed_dict argmax final_output run getLogger batch_size evaluate_pretrained_model set_random_seed get_git_revision_hash model_dir DEBUG setLevel critical seed str addHandler build shape dim_str init_seed setFormatter get_loss debug Initializer StructureModel save_dict xavier_init FileHandler int time print Formatter dim_sem load_data epochs convert_to_tensor str SavedModelBuilder final_output str_scores print float64 add_meta_graph_and_variables model_dir_prefix skip_doc_attention save info build_tensor_info empty build_signature_def vocab_file InMemoryClient evaluate_split data_output_file skip_doc_attention model_dir load_data predict matmul LReLu dropout _getDep load dump print w2v prepare dict preprocess Corpus open join split join format print filter append walk len int basename _parse_edus Document parse_fname print format join get_docdict get_alltreefiles write_docs load_labels list zip_longest dump open create_partitions read_corpus load print append open print write_partitions set append train_test_split print join range Counter join pardir abspath append _get_file_names split int print get_paired_files shuffle floor _get_file_names len pop remove print create_paired_dict set append write_files create_data_splits join defaultdict print make_dir Counter split append enumerate makedirs combinations list zip set mean intersection append sum array range len get_tree str_scores parse_tree PyMaxSpanTree delete DependencyTree append decode parser remove ones print extend union set array len list print keys CountVectorizer fit_transform print sum maximum log get_word_counts_and_index reshape get_words calculate_ppmi arange tgt_idx src_idx values list defaultdict Counter from_iterable edges append array_split get_arc_length keys enumerate entropy_for_parents items print extend get_leaf_proportion array len arange abs list ttest_ind ones Counter edges append height array_split sentiments get_arc_length sentiment_scores keys enumerate items print get_parent_entropy extend get_leaf_proportion array len append next range len len zeros abs src_idx enumerate unique pop children format debug strip RSTNode warning startswith append label _fix_lines len count endswith strip startswith append enumerate split lower join polarity_scores vader_sentiment format print now set_sentiment append hu_liu_sentiment enumerate
# Learning Structured Text Representations Code for the paper: [Learning Structured Text Representations](https://arxiv.org/abs/1705.09207) Yang Liu and Mirella Lapata, Accepted by TACL ## Dependencies This code is implemented with Tensorflow and the data preprocessing is with Gensim ## Document Classification #### Data The pre-processed YELP 2013 data can be downloaded at https://drive.google.com/open?id=0BxGUKratNjbaZjFIR1MtbkdzZVU
1,998
elki-project/elki
['outlier detection', 'data compression']
['ELKI: A large open-source library for data analysis - ELKI Release 0.7.5 "Heidelberg"', 'BETULA: Numerically Stable CF-Trees for BIRCH Clustering']
elki-core-math/src/test/resources/elki/math/statistics/distribution/distribution-gen-testdata.py data/testdata/correlation-outlier/scale-n/make-scale-n.py data/testdata/correlation-outlier/scale-d/make-scale-d.py addons/joglvis/src-manual/build.py gradle/travis-show-failures.py fmt sub isinstance
# ELKI ##### Environment for Developing KDD-Applications Supported by Index-Structures [![Unit tests](https://github.com/elki-project/elki/actions/workflows/gradle-build.yml/badge.svg)](https://github.com/elki-project/elki/actions/workflows/gradle-build.yml) [![License AGPL-3.0](https://img.shields.io/badge/License-AGPL--3-34D058.svg?labelColor=444D56)](https://elki-project.github.io/license) [![DBLP:conf/sisap/Schubert22](https://img.shields.io/badge/Cite%20as%3A-DBLP%3Aconf%2Fsisap%2FSchubert22-34D058?labelColor=444D56)](https://dblp.org/rec/conf/sisap/Schubert22.html?view=bibtex) ## Quick Summary ELKI is an open source (AGPLv3) data mining software written in Java. The focus of ELKI is research in algorithms, with an emphasis on unsupervised methods in cluster analysis and outlier detection. In order to achieve high performance and scalability, ELKI offers many data index structures such as the R*-tree that can provide major performance gains. ELKI is designed to be easy to extend for researchers and students in this domain, and welcomes contributions in particular of new methods. ELKI aims at providing a large collection of highly parameterizable algorithms, in order to allow easy and fair evaluation and benchmarking of algorithms.
1,999