summaryrefslogtreecommitdiff
path: root/myweb
diff options
context:
space:
mode:
authorzhang <zch921005@126.com>2022-07-03 12:49:17 +0800
committerzhang <zch921005@126.com>2022-07-03 12:49:17 +0800
commit8131406d83acad62de49ad51f219b3d2dba562d8 (patch)
tree223b630dcd131bbd1d1e061a3c45dd719f2238eb /myweb
parent8c1d5025e8a7c341ea651821222229ca75cd8208 (diff)
torch.no_grad vs. requires_grad
Diffstat (limited to 'myweb')
-rw-r--r--myweb/demo/app.py11
-rw-r--r--myweb/demo/templates/index.html4
2 files changed, 15 insertions, 0 deletions
diff --git a/myweb/demo/app.py b/myweb/demo/app.py
new file mode 100644
index 0000000..86a9b08
--- /dev/null
+++ b/myweb/demo/app.py
@@ -0,0 +1,11 @@
+from flask import Flask, render_template
+
+app = Flask(__name__)
+
+@app.route('/')
+def index():
+ return render_template('index.html')
+
+if __name__ == '__main__':
+ app.run()
+
diff --git a/myweb/demo/templates/index.html b/myweb/demo/templates/index.html
new file mode 100644
index 0000000..c5c4431
--- /dev/null
+++ b/myweb/demo/templates/index.html
@@ -0,0 +1,4 @@
+
+<html>
+hello world!
+</html> \ No newline at end of file