2023,江端さんの忘備録

外国人留学生向けに、1時間の英語でのAI技術の講義をしてきました。

I have given a one-hour lecture on AI technology in English for international students.

『講義中、'笑い'を'1つ'でも取れれば'勝ち'』

"If I get even one "laugh" during the lecture, I win"

という判断基準で講義をしました。

The lecture was based on the above criteria.

演台から降りて、学生の席の近くで、身振り手振りを交えて、話を続けました。

I stepped down from the podium and continued my talk, gesturing near the students' seats.

これは、"IETF"で私が学んだことの一つです。

This is one of the things I learned at the IETF.


-----

今回の講義で、'笑い'を'3つ"取れたと思います。

I think I got 'three laughs' in this lecture.

私の勝ちです。

I won.

2023,江端さんの忘備録

外国人留学生向けに、1時間の英語でのAI技術の講義をしてきました。

I have given a one-hour lecture on AI technology in English for international students.

「正確な英語」で「TOEICでハイスコアを出すため」に時間を費すより、「デタラメな英語」で「外国人留学生にAI技術を伝えるため」に時間を費すほうが ―― 少なくとも、私は、有意義だと感じます。

当然に、この講義の最初に話したネタはこれです。

Naturally, this is the first story I discussed at the beginning of this lecture.

これまで私が言い続け、そしてこれからも言い続ける予定のことです。

This is what I have been saying and will continue to say.

それはさておき。

That aside.

講義の前に、学生さんたちとちょっと話をしました。

Before the lecture, I had a short talk with the students.

その内容は、以下の通りです。

The contents are as follows.

(1)普段、彼らはプログラミングをやらない

(1) They usually don't do programming.

(2)彼らがAI技術を利用するときはパッケージソフトを使っている

(2) When they use AI technology, they use packaged software.

(3)プログラミングは、大学の時に講義で"Pascal"をやったくらい

(3) They only did "Pascal" in a lecture in college.

この話を聞いて、正直、私はかなりの衝撃を受けました。

Frankly, I was quite shocked to hear the story.

―― AI技術を使った研究をする研究員が、自力でAI技術のコーディングをやらない

"Researchers who do research using AI technology do not code AI technology on their own"

これは、私が属している国(日本)と同じ状況です。

This is the same situation as in the country I belong to (Japan).

そして、今回、国外でも同じ状況にあることを知り、正直信じられない気持ちです。

And now that I know that the same situation exists outside of Japan, I honestly can't believe it!

("Pascal"? それは、30年前のパラダイムだ。最低でも、Pythonを教えてあげるべきだ)

("Pascal"? That's a 30 year old paradigm. At the very least, they should be taught Python.)

-----

『そもそも、プログラムのトレースやデバッグすることなしに、どうやってAI技術を理解するんだ?』と、私はショックを隠せませんでした。

'How are they supposed to understand AI technology without tracing and debugging the programs in the first place?' I could not hide my shock.

そういえば、以前、そのような会話を後輩としたなぁ、と思い出していました ―― 『彼らにとって、パッケージソフトの出力が最終解であり、それ以上のことは考えない(*)』と言っていました。

I remembered having such a conversation with a junior colleague once -- "For them, the output of packaged software is the final solution, and they don't think beyond that(*)," he said.

(*)これを記載した私のコラムのページを見つけられませんでした。見つけた方は、私に教えて下さい

(*) I could not find the page in my column If you find it, please let me know.

-----

『我が国の義務教育プロセスでのプログラミング教育は、時間の浪費で終わる』

Programming education in our country's compulsory education process is simply a waste of time."

という私の「危惧」は、現在「確信」のレベルまでアップしています。

This "apprehension" of mine has now risen to the level of "certainty".

2023,江端さんの忘備録

外国人留学生向けに、1時間の英語でのAI技術の講義をする為に、練習を続けています。

I am continuing to practice to give a one-hour lecture on AI technology in English for international students.

国際学会発表では「事前30回練習」を基本としていますが、さすがに1時間の講義で、30時間を使うことはできませんので、散歩とか風呂とかトイレの時間を使っています。

The basic rule for international conference presentations is "practice 30 times in advance," but as expected, I cannot spend 30 hours in a one-hour lecture, so I use the time to take a walk, take a bath, or use the restroom.

------

ところで、英語に関して、私は、従来の以下の方針を、1mmも変更しておりません。

By the way, I have not changed my existing policy on English language by one millimeter as follows.

(以下のコピペの部分をクリックすると、コラムに飛びます)

(Click on the copy and paste section below to jump to the column)

------

------

で、まあ、ぶっちゃけちゃいますが ―― こんなデタラメ英語でも、英語を使った講義の講師の役目を、なんとか果たせています。

And, well, I must confess -- even with this bullshit English, I am somehow able to fulfill my role as an instructor of lectures using English.

「正確な英語」で「TOEICでハイスコアを出すため」に時間を費すより、「デタラメな英語」で「外国人留学生にAI技術を伝えるため」に時間を費すほうが ――

Spending more time "communicating AI technology to foreign students" in "bullshit English" than "getting a high score on the TOEIC" in "accurate English"

少なくとも、私は、有意義だと感じます。

At least, I think that it is meaningful.

2023,江端さんの忘備録

「追い出し部屋」というものがあるそうです。

There is something called "kick-out rooms."

一つの部屋に集めて、何も仕事を与えない ―― ただし、給料は与え続ける

Gather them in one room and give them no work -- but keep paying them.

これによって、会社側は違法性を回避しつつ、社員を精神的に追い込んで解雇に追い込むことができる、ということのようです。

This room means that the company can avoid illegality, while at the same time psyching up the employee and forcing him or her into termination.

(最近は、このような企業の行為は、「違法行為」との司法判断がされているようです)

(Recently, there has been a judicial ruling that the actions of such companies are "illegal.")

-----

私も、若いころ、同じような目にあったことがあります。

I had a similar experience when I was younger.

「追い出し部屋」とはニュアンスが違いますが、事業部の炎上案件に巻き込まれて、長期派遣になったことがあります。

Although not quite as nuanced as "kick-out room," I have been on long-term assignment after getting caught up in a firestorm in a business unit.

いわば『炎上部屋』でしょうか

A "flame room," so to speak.

しかし、現場の主任からは『何もしないでくれ』と言われていました。

But the site chief told me, 'Don't do anything'.

私、この『何もしないでくれ』の意味を良く理解していました ―― つまるところ「政治」です。

I understood well what this 'do nothing' means -- after all, it is 'politics'.

現場は、人員を増員するということで、『一生懸命対応している』という演出が必要です。

The field needs to produce a 'hard-working response' in the form of increased staffing.

しかし、炎上している案件の中に、何も知らないエンジニアを突っ込むことは、とんでもないリスクでもあります。

However, it is also a tremendous risk to plunge an uninformed engineer into a project that is under fire.

なぜなら、ゼロから教育するコスト(時間、人員)がバカ高く、加えて、炎上案件の素人がシステムに触ることで、致命的な不具合を仕込みかねないからです。

This is because the cost (time, manpower) of training from scratch is ridiculously high, and in addition, amateurs on a flaming project can touch the system and plant fatal glitches.

それ故、この案件で必要だったのは、「何もしない人員」だったのです。

Hence, what was needed in this case was "do-nothing personnel.

-----

で、私が何をやっていたかというと、以前からやりたかったことを一人でやりまくっていました。

So what I was doing was something I had wanted to do for a long time in the flame room.

「Linuxのカーネル改造」です。

"Linux Kernel Modification"

この技術に手を出せる人はそれほど多くないと思います。(能力はさておき)膨大な時間が必要となるからです。

Not many people can afford this technology. (Let alone the ability to do so.) This is because it requires an enormous amount of time.

あの炎上部屋でのたった一人の静謐な時間は、今思い出しても、非常に贅沢な時間だったと思います。

The serenity of being alone in that flame room was a very luxurious time, as I recall now.

朝から晩まで好きなコーディングを月単位で貰えるような、そんな機会は滅多にあるものではありません。

It is not often that I get such an opportunity to get the coding I like from morning to night on a monthly basis.

そんでもって、ここで培った技で、その後10年はメシを喰ったという自覚があります。

And I am aware that the skills I developed here have kept me fed for the next 10 years.

-----

ソフトウェアエンジニアの強みは、「会社に命じられなくてもやれること(正確には「やりたいこと」)が山ほどあり、そして、それが『一人でもできる』」という点にあります。

The strength of software engineers lies in the fact that "there are a lot of things we can do (or more precisely, things we want to do) without being ordered by the company, and we can do them 'alone'.

そのような技は、自分のノウハウにもなり、上手くいけば、会社の利益にもなることもあります。

Such techniques can be your own know-how and, hopefully, benefit your company.

『楽しい「追い出し部屋」ライフ』という観点からも、プログラミング技術の取得はお勧めです。

From the viewpoint of "enjoyable 'kick-out room' life," acquiring programming skills is also recommended.

2023,江端さんの技術メモ

使う度に調べるので、メモしておきます。

1. 40歳から44歳の人の人数を数えろ
=COUNTIFS($B$1:$B$498, ">=45",$B$1:$B$498, "<50" )

2.55歳から59歳の人の不満値の平均値を求めよ
=AVERAGEIFS($J$1:$J$498, $B$1:$B$498, ">=55",$B$1:$B$498, "<60" )

Keywords: COUNTIF, COUNTIFS, AVERAGEIFS

 

2023,江端さんの忘備録

最近は聞かれなくなった言葉に、『自分探し』というものがあります。

One word that is no longer heard these days is "self-discovery.

―― 自分とは何者であるか

"Who I am"

哲学的な問いですが、私、この答を見つける最適最短手段を知っています。

This is a philosophical question, but I know the best and shortest way to find the answer.

『「育児」and/or「介護」の当事者になる』

Becoming a Party to "Childcare" and/or "Caregiving"

これだけです。

That's all.

-----

もう、そりゃ、自分が認識していなかった自分が「もろ見え」です。

I can already "see" myself that I didn't recognize.

特に、肉体的、精神的限界に至った時の、自分の中に潜む「どす黒い感情」が赤裸々に見えて ―― 自分でびっくりします。

Especially when I reach my physical and mental limits, I can see nakedly the "black emotions" that lurk within me -- I am surprised at myself.

『極限状態の戦場では、その人の本質が明らかになる』と言われます。

It is said that "the nature of a person is revealed on the battlefield under extreme conditions.

その意味で、「育児」「介護」は準戦場と言えるかもしれません。

"In this sense, "childcare" and "caregiving" could be described as a quasi-battlefield situation.

-----

もちろん、好んで戦場に行く必要はありません。

Of course, you do not have to go to the battlefield by preference.

これらを忌避して生きてもいいんですか ―― いいんです(楽天カードのCM風)。

Is it OK to live in evasion of these things? -- it's OK (Rakuten Card commercial style).

-----

ただ、個人的に言えば ―― 『「育児」and/or「介護」の当事者』になった人は「信用できる」とは思います。

However, speaking personally -- I think that people who have been "involved in "childcare" and/or "caregiving" are "trustworthy".

一方、このような「体験至上主義」が、いわゆる、結婚ハラスメント、育児ハラスメント、介護ハラスメントの温床になっている、という自覚もあります。

On the other hand, we are also aware that this "experience-history principle" has become a breeding ground for so-called marriage harassment, childcare harassment, and caregiver harassment.

2023,江端さんの忘備録

高校の時は、漠然と応用物理学を専攻したいと思っていました。

In high school, I vaguely wanted to major in applied physics.

大学では電子工学を、大学院では電気工学を、

I studied electronics in college and electrical engineering in graduate school.

そして、その後は、以下の図に記載した業務に携わり、

Then, afterwards, I was involved in the operations described in the following diagram.

で、本日、

So, the following card arrived today.

が、届きました。

-----

―― 思えば、遠くに来たもんだ

"Come to think of it, I've come a long way"

と、しみじみと実感しています。

I am deeply aware of this.

2023,江端さんの忘備録

今日も資料作成の為に、特許検索サイトに行きました。

I went to the patent search site again today to prepare documents.

ところが、

However,

というメッセージを受けて、今、困っています。

I am now in trouble because I received th above message.

メンテナンスは必須ですので、仕方がないことです。

Maintenance is a must, so it is inevitable.

しかし、『動いているのが当たり前と思っているものが止まる』というのは、困るものです。

However, it is troubling when 'things that we take for granted to be moving stop.

-----

そういえば、今回のコラムで、

In this column, I wrote

江端:「ああ、それは分かります。私たちは、普段から『私が突然いなくなっても、社会は1mmも困らない』ことを良く知っていますが、その事実を直視すると凹みますからね」

Ebata: "Oh, I understand that. We usually know very well that 'even if I suddenly disappear, society will not be troubled one millimeter,' but when we face that fact, it makes a dent, you know."

と記載しました。

で、今、

So, now, I am thinking

―― 私の価値って、特許検索エンジンの価値の1/1000以下よりも、はるかに低いんだろうなぁ

"I guess my value is much less than 1/1000th of the value of a patent search engine"

とか思って、勝手に凹んでいます。

And I am depressed on my own.

2023,江端さんの技術メモ

This program is based on the following page
https://qiita.com/ufoo68/items/9e4ca04578ba0f5fa5ff

This program solves the XOR problem using MLP with one hidden layer.

#include <stdio.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
//num of units
#define NUM_INPUT 2
//#define NUM_HIDDEN 20
#define NUM_HIDDEN 2

double sigmoid(double x) {
    return 1/(1+exp(-x));
}

//derivative of sigmoid function
double d_sigmoid(double x) {
    double a = 0.1;
    return a*x*(1-x);
}

int main(void) {
    srand((unsigned)time(NULL));
//train data
    double train_x[4][NUM_INPUT+1] = {{0, 0, -1},{0, 1, -1},{1, 0, -1},{1, 1, -1}};
    double d[4] = {0, 1, 1, 0};
//net
    double w[NUM_HIDDEN+1][NUM_INPUT+1];
    double v[NUM_HIDDEN+1];
    double y[4][NUM_HIDDEN+1];
    double z[4];
    double eta = 0.1;
    int epoch = 1000000;
//other
    int i, j, k, l;
    double tmp = 0;

//update weights using rand()
    for(l=0; l<NUM_HIDDEN+1; l++) {
        for(i=0; i<NUM_INPUT+1; i++) {
            w[l][i] = ((double)rand() / ((double)RAND_MAX + 1));
        }
    }
    for(i=0; i<NUM_HIDDEN+1; i++) {
        v[i] = ((double)rand() / ((double)RAND_MAX + 1));
    }

//tain
    for(k=0; k<epoch; k++) {
        //feedforward
        for(j=0; j<4; j++) {
            //hidden
            for(l=0; l<NUM_HIDDEN; l++) {
                for(i=0; i<NUM_INPUT+1; i++) {
                    tmp += train_x[j][i] * w[l][i];
                }
                y[j][l] = sigmoid(tmp);
                tmp = 0;
            }
            y[j][NUM_HIDDEN] = -1;
            //output
            for(i=0; i<NUM_HIDDEN+1; i++) {
                tmp += y[j][i] * v[i];
            }
            z[j] = sigmoid(tmp);
            tmp = 0;

        //backward
            //output
            for(i=0; i<NUM_HIDDEN+1; i++) {
                v[i] = v[i] - eta * y[j][i] * d_sigmoid(z[j]) * (z[j] - d[j]);
            }

            //hidden
            for(l=0; l<NUM_INPUT+1; l++) {
                for(i=0; i<NUM_HIDDEN+1; i++) {
                    w[i][l] = w[i][l] - eta * train_x[j][l] * d_sigmoid(y[j][i]) * d_sigmoid(z[j]) * (z[j] - d[j]) * v[i];
                }
            }
        }

		/*
        //print detail
        printf("z=");
        for(i=0; i<4; i++) {
            printf("%f ", z[i]);
        }
        printf("epoch:%d\n",k);
		*/
    }

//predict
    for(j=0; j<4; j++) {
        //hidden
        for(l=0; l<NUM_HIDDEN; l++) {
            for(i=0; i<NUM_INPUT+1; i++) {
                tmp += train_x[j][i] * w[l][i];
            }
            y[j][l] = sigmoid(tmp);
            tmp = 0;
        }
        y[j][NUM_HIDDEN] = -1;
        //output
        for(i=0; i<NUM_HIDDEN+1; i++) {
            tmp += y[j][i] * v[i];
        }
        z[j] = sigmoid(tmp);
        tmp = 0;
    }

//print result
    printf("z=");
    for(i=0; i<4; i++) {
        printf("%f ", z[i]);
    }
    printf("epoch:%d\n",k);


    for(i=0; i<NUM_INPUT+1; i++) {
        for(l=0; l<NUM_HIDDEN+1; l++) {
		  printf("w[%d][%d]:%f\n", i, l, w[i][l]);
        }
    }

    for(i=0; i<NUM_HIDDEN+1; i++) {
	  printf("v[%d]:%f\n",i, v[i]);
    }


    return 0;
}

Save this program as a name "mlp.c", compile ">gcc mlp.c" and execute ">./a.exe"