karolmajek/Axial-DeepLab-SWideRNet
0
1// Copyright 2021 The Deeplab2 Authors.2//3// Licensed under the Apache License, Version 2.0 (the "License");4// you may not use this file except in compliance with the License.5// You may obtain a copy of the License at6//7// http://www.apache.org/licenses/LICENSE-2.08//9// Unless required by applicable law or agreed to in writing, software10// distributed under the License is distributed on an "AS IS" BASIS,11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12// See the License for the specific language governing permissions and13// limitations under the License.14 15syntax = "proto2";16 17package deeplab2;18 19option java_multiple_files = true;20 21// Configure the solver options.22// Next ID: 1723message SolverOptions {24 optional bool use_sync_batchnorm = 1 [default = true];25 optional float batchnorm_momentum = 14 [default = 0.99];26 optional float batchnorm_epsilon = 15 [default = 0.001];27 // Set the learning rate policy for training. Available policies: 'poly',28 // 'cosine'.29 optional string learning_policy = 2 [default = 'poly'];30 // Set the base learning rate for model training.31 optional float base_learning_rate = 3 [default = 1e-3];32 // Set the power value used in the poly learning policy.33 optional float poly_learning_power = 4 [default = 0.9];34 // End learning rate for polynomial learning rate schedule.35 optional float poly_end_learning_rate = 5 [default = 0.0];36 // Set the number of steps for the warmup phase. We currently only37 // support linear warmup, i.e., if global_step < warmup_steps, the38 // learning rate will be `global_step / warmup_steps * base_learning_rate`.39 optional int32 warmup_steps = 6 [default = 0];40 // Set the optimizer method. Supported types: 'adam', 'sgd'.41 optional string optimizer = 7 [default = 'adam'];42 // Set the value of the weight decay for training.43 optional float weight_decay = 8 [default = 0];44 // Set whether to use gradient clipping or not.45 optional bool use_gradient_clipping = 9 [default = false];46 // Set the norm used in gradient clipping.47 optional float clip_gradient_norm = 10 [default = 10.0];48 // Set the number of steps for training.49 optional int32 training_number_of_steps = 11 [default = 60000];50 // Set the backbone learning rate multiplier when different learning rates51 // are desired for the backbone and for the other layers. For example,52 // MaX-DeepLab uses this field to set a 0.1x learning rate for the pretrained53 // backbone parameters.54 optional float backbone_learning_rate_multiplier = 16 [default = 1.0];55}56 57/********** Submessages used to config loss options **********/58// Configure the loss options.59message LossOptions {60 message SingleLossOptions {61 // Set the name of the loss.62 optional string name = 1;63 // Set the global weight of the loss used to weight the contribution of this64 // loss with respect to all other losses.65 optional float weight = 2 [default = 1.0];66 // Set the percentage of top-k pixels to be used for backpropagation.67 optional float top_k_percent = 3 [default = 1.0];68 }69 // Set the loss options for the semantic segmentation output.70 optional SingleLossOptions semantic_loss = 1;71 // Set the loss options for the center head.72 optional SingleLossOptions center_loss = 2;73 // Set the loss options for the regression head.74 optional SingleLossOptions regression_loss = 3;75 // Set the loss options for the motion head.76 optional SingleLossOptions motion_loss = 4;77 // Set the loss options for the next regression head.78 optional SingleLossOptions next_regression_loss = 5;79 // Set the loss options for the PQ-style loss.80 optional SingleLossOptions pq_style_loss = 6;81 // Set the loss options for the mask id cross entropy loss.82 optional SingleLossOptions mask_id_cross_entropy_loss = 7;83 // Set the loss options for the instance discrimination loss.84 optional SingleLossOptions instance_discrimination_loss = 8;85}86 87// Configure the trainer options.88message TrainerOptions {89 // Set the maximum number of checkpoints to keep.90 optional int32 num_checkpoints_to_keep = 1 [default = 5];91 // Set the number of steps after which a checkpoint should be made.92 optional int32 save_checkpoints_steps = 2 [default = 1000];93 // Set after how many steps the summary should be written. Must be a multiple94 // of steps_per_loop.95 optional int32 save_summaries_steps = 3 [default = 1000];96 // Set how many steps one `inner` train loop should have. This relates to the97 // orbit framework:98 // https://github.com/tensorflow/models/blob/master/orbit/controller.py#L3399 optional int32 steps_per_loop = 4 [default = 1000];100 // Set the loss options.101 optional LossOptions loss_options = 5;102 // Set the solver options.103 optional SolverOptions solver_options = 6;104}105 