1
+ {
2
+ "nbformat" : 4 ,
3
+ "nbformat_minor" : 0 ,
4
+ "metadata" : {
5
+ "colab" : {
6
+ "provenance" : [],
7
+ "authorship_tag" : " ABX9TyOniB04EaRWqiflrTGF0pX9" ,
8
+ "include_colab_link" : true
9
+ },
10
+ "kernelspec" : {
11
+ "name" : " python3" ,
12
+ "display_name" : " Python 3"
13
+ },
14
+ "language_info" : {
15
+ "name" : " python"
16
+ }
17
+ },
18
+ "cells" : [
19
+ {
20
+ "cell_type" : " markdown" ,
21
+ "metadata" : {
22
+ "id" : " view-in-github" ,
23
+ "colab_type" : " text"
24
+ },
25
+ "source" : [
26
+ " <a href=\" https://colab.research.google.com/github/peelidramuk/C/blob/master/tf_demo.ipynb\" target=\" _parent\" ><img src=\" https://colab.research.google.com/assets/colab-badge.svg\" alt=\" Open In Colab\" /></a>"
27
+ ]
28
+ },
29
+ {
30
+ "cell_type" : " code" ,
31
+ "execution_count" : null ,
32
+ "metadata" : {
33
+ "colab" : {
34
+ "base_uri" : " https://localhost:8080/"
35
+ },
36
+ "id" : " vmFUM31sYF2T" ,
37
+ "outputId" : " 6d4f3b13-b7c5-4522-c0f6-467895357b10"
38
+ },
39
+ "outputs" : [
40
+ {
41
+ "output_type" : " stream" ,
42
+ "name" : " stdout" ,
43
+ "text" : [
44
+ " Cloning into 'models'...\n " ,
45
+ " remote: Enumerating objects: 102123, done.\u001b [K\n " ,
46
+ " remote: Counting objects: 100% (257/257), done.\u001b [K\n " ,
47
+ " remote: Compressing objects: 100% (132/132), done.\u001b [K\n " ,
48
+ " remote: Total 102123 (delta 172), reused 125 (delta 125), pack-reused 101866 (from 3)\u001b [K\n " ,
49
+ " Receiving objects: 100% (102123/102123), 629.39 MiB | 23.85 MiB/s, done.\n " ,
50
+ " Resolving deltas: 100% (72763/72763), done.\n "
51
+ ]
52
+ }
53
+ ],
54
+ "source" : [
55
+ " !git clone https://github.com/tensorflow/models.git"
56
+ ]
57
+ },
58
+ {
59
+ "cell_type" : " code" ,
60
+ "source" : [
61
+ " # Change into models/research directory\n " ,
62
+ " %cd models/research\n " ,
63
+ " \n " ,
64
+ " # Compile protobufs and install object detection API\n " ,
65
+ " !protoc object_detection/protos/*.proto --python_out=.\n " ,
66
+ " \n " ,
67
+ " # Install required Python packages\n " ,
68
+ " !pip install tf_slim\n " ,
69
+ " !pip install .\n " ,
70
+ " \n " ,
71
+ " # Go back to root to continue other tasks\n " ,
72
+ " %cd /\n "
73
+ ],
74
+ "metadata" : {
75
+ "colab" : {
76
+ "base_uri" : " https://localhost:8080/"
77
+ },
78
+ "id" : " amSk1xGwYZQC" ,
79
+ "outputId" : " 6959a000-1908-486a-b063-9781f44fdc93"
80
+ },
81
+ "execution_count" : null ,
82
+ "outputs" : [
83
+ {
84
+ "output_type" : " stream" ,
85
+ "name" : " stdout" ,
86
+ "text" : [
87
+ " [Errno 2] No such file or directory: 'models/research'\n " ,
88
+ " /\n " ,
89
+ " Could not make proto path relative: object_detection/protos/*.proto: No such file or directory\n " ,
90
+ " Requirement already satisfied: tf_slim in /usr/local/lib/python3.11/dist-packages (1.1.0)\n " ,
91
+ " Requirement already satisfied: absl-py>=0.2.2 in /usr/local/lib/python3.11/dist-packages (from tf_slim) (1.4.0)\n " ,
92
+ " \u001b [31mERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.\u001b [0m\u001b [31m\n " ,
93
+ " \u001b [0m/\n "
94
+ ]
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "cell_type" : " code" ,
100
+ "source" : [
101
+ " import tensorflow as tf\n " ,
102
+ " print(\" TensorFlow version:\" , tf.__version__)"
103
+ ],
104
+ "metadata" : {
105
+ "colab" : {
106
+ "base_uri" : " https://localhost:8080/"
107
+ },
108
+ "id" : " PFtZ5aCHYdeN" ,
109
+ "outputId" : " 93e95349-22c5-450e-c7c0-b38b6688addb"
110
+ },
111
+ "execution_count" : null ,
112
+ "outputs" : [
113
+ {
114
+ "output_type" : " stream" ,
115
+ "name" : " stdout" ,
116
+ "text" : [
117
+ " TensorFlow version: 2.18.0\n "
118
+ ]
119
+ }
120
+ ]
121
+ },
122
+ {
123
+ "cell_type" : " code" ,
124
+ "source" : [
125
+ " !git config --global user.email \" [email protected] \"\n " ,
126
+ " !git config --global user.name \" Dileep Kumar\"\n "
127
+ ],
128
+ "metadata" : {
129
+ "id" : " kdUdbc5cYx_8"
130
+ },
131
+ "execution_count" : 1 ,
132
+ "outputs" : []
133
+ },
134
+ {
135
+ "cell_type" : " code" ,
136
+ "source" : [
137
+ " !mkdir -p colab-playground\n " ,
138
+ " !cp /content/tf-demo.ipynb colab-playground/\n "
139
+ ],
140
+ "metadata" : {
141
+ "colab" : {
142
+ "base_uri" : " https://localhost:8080/"
143
+ },
144
+ "id" : " RLXTcu9WY-fK" ,
145
+ "outputId" : " cbb0ed84-f6e2-4c25-d3ab-45e2570e695e"
146
+ },
147
+ "execution_count" : 2 ,
148
+ "outputs" : [
149
+ {
150
+ "output_type" : " stream" ,
151
+ "name" : " stdout" ,
152
+ "text" : [
153
+ " cp: cannot stat '/content/tf-demo.ipynb': No such file or directory\n "
154
+ ]
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ "cell_type" : " code" ,
160
+ "source" : [],
161
+ "metadata" : {
162
+ "id" : " Q1WR5HCZZAGn"
163
+ },
164
+ "execution_count" : null ,
165
+ "outputs" : []
166
+ }
167
+ ]
168
+ }
0 commit comments