Sinh#

  • Domain: ai.onnx

  • Since version: 22

Computes the Sinh value of the input tensor element-wise.

Inputs

  • input (T): Input tensor

Outputs

  • output (T): The hyperbolic sine values of the input tensor computed element-wise

Type Constraints

  • T: Constrain input and output types to float tensors. Allowed types: tensor(bfloat16), tensor(double), tensor(float), tensor(float16).

Examples#

test_cc_sinh

Node:
  Sinh(x) -> (y)
Inputs:
  x: shape=(2, 3), dtype=float32
    [[-2. , -1. ,  0. ],
     [ 0.5,  1. ,  2. ]]

Outputs:
  y: shape=(2, 3), dtype=float32
    [[-3.6268604, -1.1752012,  0.       ],
     [ 0.5210953,  1.1752012,  3.6268604]]

test_sinh

Node:
  Sinh(x) -> (y)
Inputs:
  x: shape=(3, 4, 5), dtype=float32
    [[[0.5665616 , 0.7457818 , 0.97100276, 0.4443592 , 0.4442647 ],
      [0.7628944 , 0.87734866, 0.5230672 , 0.2855087 , 0.79399663],
      [0.40414217, 0.60542035, 0.4549379 , 0.530079  , 0.4359654 ],
      [0.16703498, 0.64533466, 0.8153506 , 0.681705  , 0.88432455]],

     [[0.06596019, 0.08141465, 0.49587995, 0.12310889, 0.28691137],
      [0.04790118, 0.5155199 , 0.7137708 , 0.04374827, 0.9977479 ],
      [0.5978522 , 0.5865951 , 0.39716926, 0.43898672, 0.25327316],
      [0.5297574 , 0.5436708 , 0.74823534, 0.8180335 , 0.66857344]],

     [[0.86182827, 0.70817924, 0.23636054, 0.6562355 , 0.86890894],
      [0.8393313 , 0.32443324, 0.15917933, 0.893939  , 0.91269016],
      [0.30185628, 0.13158494, 0.32568365, 0.9401739 , 0.39366215],
      [0.08773083, 0.60704976, 0.1554775 , 0.9583321 , 0.8756153 ]]]

Outputs:
  y: shape=(3, 4, 5), dtype=float32
    [[[0.59736204, 0.8168628 , 1.130944  , 0.45912775, 0.45902377],
      [0.8390796 , 0.99431604, 0.5472474 , 0.2894034 , 0.88009286],
      [0.41523385, 0.6430886 , 0.4707941 , 0.555254  , 0.44990757],
      [0.16781281, 0.691069  , 0.90874183, 0.735746  , 1.0041777 ]],

     [[0.06600803, 0.08150462, 0.51645386, 0.12342009, 0.29086393],
      [0.0479195 , 0.5386594 , 0.7759409 , 0.04376223, 1.1717288 ],
      [0.6341089 , 0.62081933, 0.40769374, 0.4532227 , 0.25598967],
      [0.5548862 , 0.5708522 , 0.8200333 , 0.9123704 , 0.7195062 ]],

     [[0.972548  , 0.7688755 , 0.23856746, 0.70436096, 0.98244953],
      [0.9414097 , 0.33015475, 0.1598524 , 1.0178496 , 1.044786  ],
      [0.30646127, 0.131965  , 0.3314718 , 1.0849334 , 0.40390885],
      [0.08784342, 0.64502674, 0.15610465, 1.111906  , 0.9918731 ]]]

test_sinh_example

Node:
  Sinh(x) -> (y)
Inputs:
  x: shape=(3,), dtype=float32
    [-1.,  0.,  1.]

Outputs:
  y: shape=(3,), dtype=float32
    [-1.1752012,  0.       ,  1.1752012]

Differences with previous version (9)#

SchemaDiff: Sinh (domain 'ai.onnx')

  • old version: 9

  • new version: 22

  • breaking: no

Type constraints:

  • changed ‘T’: added types: [‘tensor(bfloat16)’]

Version History#