Skip to content

Commit

Permalink
add kornia.geometry.liegroup.So3 transpilation to nightly binaries tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam-Armstrong committed Sep 13, 2024
1 parent 8db7b5d commit 752cc8d
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-nightly-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
resnet_demo_cpu,
lstm_torch_to_tensorflow_cpu,
kornia_demo,
kornia_So3,
]

steps:
Expand Down
51 changes: 51 additions & 0 deletions examples_and_demos/kornia_So3.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install -q ivy kornia"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import ivy\n",
"import tensorflow as tf\n",
"import kornia"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"TranspiledQuaternion = ivy.transpile(kornia.geometry.quaternion.Quaternion, source=\"torch\", target=\"tensorflow\")\n",
"TranspiledSo3 = ivy.transpile(kornia.geometry.liegroup.So3, source=\"torch\", target=\"tensorflow\")\n",
"\n",
"quaternion_data = tf.convert_to_tensor([1., 0., 0., 0.])\n",
"transpiled_quaternion = TranspiledQuaternion(quaternion_data)\n",
"transpiled_so3 = TranspiledSo3(transpiled_quaternion)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"name": "python",
"version": "3.10.14"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 752cc8d

Please sign in to comment.