|
- /* Copyright 2021 Tianshu AI Platform. All Rights Reserved.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- ============================================================= */
-
- syntax = "proto3";
- package oneflow;
-
- import "oneflow/customized/utils/tensor.proto";
- import "oneflow/customized/utils/projector.proto";
- import "oneflow/customized/utils/transtext.proto";
-
- message HistogramProto {
- double min = 1;
- double max = 2;
- double num = 3;
- double sum = 4;
- double sum_squares = 5;
- repeated double bucket_limit = 6 [packed = true];
- repeated double bucket = 7 [packed = true];
- };
-
- message SummaryMetadata {
- message PluginData {
- string plugin_name = 1;
- bytes content = 2;
- }
-
- PluginData plugin_data = 1;
-
- string display_name = 2;
-
- string summary_description = 3;
- };
-
- message Summary {
- message Audio {
- // Sample rate of the audio in Hz.
- float sample_rate = 1;
- // Number of channels of audio.
- int64 num_channels = 2;
- // Length of the audio in frames (samples per channel).
- int64 length_frames = 3;
- // Encoded audio data and its associated RFC 2045 content type (e.g.
- // "audio/wav").
- bytes encoded_audio_string = 4;
- string content_type = 5;
- }
-
- message Image {
- // Dimensions of the image.
- int32 height = 1;
- int32 width = 2;
- // Valid colorspace values are
- // 1 - grayscale
- // 2 - grayscale + alpha
- // 3 - RGB
- // 4 - RGBA
- // 5 - DIGITAL_YUV
- // 6 - BGRA
- int32 colorspace = 3;
- // Image data in encoded format. All image formats supported by
- // image_codec::CoderUtil can be stored here.
- bytes encoded_image_string = 4;
- }
-
- message Value {
- string tag = 1;
- SummaryMetadata metadata = 9;
-
- // Value associated with the tag.
- oneof value {
- float simple_value = 2; // scalar
- Image image = 4; // image, video
- HistogramProto histo = 5; // histogram
- Audio audio = 6; // audio
- Projector projector = 7; // embedding, exception
- TensorProto tensor = 8; // text
- Transformer transformer = 10;
- }
- }
- message Transformer {
- repeated AttentionItem attentionItem = 1;
- string default_filter = 2;
- string bidirectional = 3;
- string displayMode = 4;
- int32 layer = 5;
- int32 head = 6;
- }
- repeated Value value = 1;
- };
|