Hiroaki OGASAWARA commited on
Commit
5e0e168
1 Parent(s): 04a6cf6

Upload folder using huggingface_hub

Browse files
app.py CHANGED
@@ -70,8 +70,10 @@ demo = gr.Interface(
70
  inputs="textbox",
71
  outputs="label",
72
  examples=[
73
- "炊き立て・・・・ってコト!?",
74
- "晴れた空に種を蒔こう",
 
 
75
  ],
76
  )
77
 
 
70
  inputs="textbox",
71
  outputs="label",
72
  examples=[
73
+ "守りたいんだ",
74
+ "どうしてどうしてどうして",
75
+ "そこから見ていてね",
76
+ "ヤンパパン"
77
  ],
78
  )
79
 
notebooks/loss.ipynb ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "markdown",
5
+ "metadata": {},
6
+ "source": [
7
+ "交差検証における損失の目安を知る"
8
+ ]
9
+ },
10
+ {
11
+ "cell_type": "code",
12
+ "execution_count": 8,
13
+ "metadata": {},
14
+ "outputs": [],
15
+ "source": [
16
+ "import torch"
17
+ ]
18
+ },
19
+ {
20
+ "cell_type": "code",
21
+ "execution_count": null,
22
+ "metadata": {},
23
+ "outputs": [],
24
+ "source": [
25
+ "# 100%正しい場合\n",
26
+ "torch.nn.functional.cross_entropy(\n",
27
+ " torch.Tensor([[0,1]]),\n",
28
+ " torch.Tensor([[0,1]])\n",
29
+ ")"
30
+ ]
31
+ },
32
+ {
33
+ "cell_type": "code",
34
+ "execution_count": 9,
35
+ "metadata": {},
36
+ "outputs": [
37
+ {
38
+ "data": {
39
+ "text/plain": [
40
+ "tensor(0.3133)"
41
+ ]
42
+ },
43
+ "execution_count": 9,
44
+ "metadata": {},
45
+ "output_type": "execute_result"
46
+ }
47
+ ],
48
+ "source": [
49
+ "# 100%誤っている場合\n",
50
+ "torch.nn.functional.cross_entropy(\n",
51
+ " torch.Tensor([[0,1]]),\n",
52
+ " torch.Tensor([[1,0]])\n",
53
+ ")"
54
+ ]
55
+ },
56
+ {
57
+ "cell_type": "code",
58
+ "execution_count": null,
59
+ "metadata": {},
60
+ "outputs": [],
61
+ "source": []
62
+ }
63
+ ],
64
+ "metadata": {
65
+ "kernelspec": {
66
+ "display_name": "chiikawa-yonezu",
67
+ "language": "python",
68
+ "name": "python3"
69
+ },
70
+ "language_info": {
71
+ "codemirror_mode": {
72
+ "name": "ipython",
73
+ "version": 3
74
+ },
75
+ "file_extension": ".py",
76
+ "mimetype": "text/x-python",
77
+ "name": "python",
78
+ "nbconvert_exporter": "python",
79
+ "pygments_lexer": "ipython3",
80
+ "version": "3.11.7"
81
+ }
82
+ },
83
+ "nbformat": 4,
84
+ "nbformat_minor": 2
85
+ }
notebooks/preprocessing.ipynb CHANGED
@@ -95,7 +95,7 @@
95
  "metadata": {},
96
  "outputs": [],
97
  "source": [
98
- "csv_path = '../data/data.csv'\n",
99
  "preprocessed_csv_path = csv_path.replace('.csv', '_preprocessed.csv')\n",
100
  "preprocess(csv_path, preprocessed_csv_path)\n",
101
  "split(preprocessed_csv_path)"
 
95
  "metadata": {},
96
  "outputs": [],
97
  "source": [
98
+ "csv_path = '../data/datawithrakko.csv'\n",
99
  "preprocessed_csv_path = csv_path.replace('.csv', '_preprocessed.csv')\n",
100
  "preprocess(csv_path, preprocessed_csv_path)\n",
101
  "split(preprocessed_csv_path)"
notebooks/train.ipynb CHANGED
The diff for this file is too large to render. See raw diff