신규 보드 (A) 나와서 코드 수정하고

신규 보드 (B) 나와서 빌드고 굽는데 간이 테스트 하는데 안켜저서 멘붕

B 보드의 구버전 가지고 하는데 켜지는데(리부팅 안하고 펌웨어만 jtag으로 올림)

B 보드의 신버전은 jtag으로 올려도 깜깜 무소식.

디버깅 모드로 해야지 콘솔로 먼가 좀 뜨다 마는데

 

만든 사람에게 연락하니 디버깅 해보라고 1차 멘붕

1시간 정도 스턴 걸려 있는데

나중에 전화와서 부트로더 추가했다고 올려보라고 한다.

 

아니.. 그정도 중대 변경사항은 이야기를 해줘야지 ㅠㅠ

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

내일은 월요일  (0) 2025.10.12
10월의 시작  (0) 2025.10.01
복리 / 단리  (0) 2025.09.17
외근  (0) 2025.09.09
압박붕대  (2) 2025.08.25
Posted by 구차니
개소리 왈왈/컴퓨터2025. 9. 18. 10:40

pcie x1 lane 에 딱 꽂아서 상큼하게 쓰려고 했는데

히트싱크 + 쿨러 높이가 슬롯 1개를 넘어서

그래픽 카드를 간섭하는 바람에 꽂을수가 없게 되었다.

btx 라고 해야하나 mATX라고 해야하나 x1 랑 x16 딱 두개만 있는 녀석이라

이거 답이 안나오게 되었네..

이렇게 된 김에 m.2 * 1 / pcie x16 * 1 지원하는 세대로 갈아타야하나? (배보다 배꼽이 커지는 중)

 

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

lg sh5 hdmi arc  (0) 2025.09.22
abko k1924 적축 키보드 구매  (2) 2025.09.18
알리 부품 도착  (0) 2025.09.16
키보드 수리 2  (0) 2025.09.14
SK-8845RC USB 포트  (0) 2025.09.10
Posted by 구차니
하드웨어/Network 장비2025. 9. 17. 16:51

엥.. 예전에 본거 같은데 찾다보니 지원 안하는 모델인가..

회사꺼 T24000M 인데 지원안함.. 포트트렁킹만 보임

[링크 : https://intotw.tistory.com/172]

'하드웨어 > Network 장비' 카테고리의 다른 글

fc san  (0) 2025.03.08
modinfo bnx2x (BCM957810)  (0) 2025.02.26
랜카드 sr-iov 설정  (0) 2025.02.26
ubuntu 네트워크 연결되지 않음 40초 간격  (0) 2025.02.26
BCM957810A1008G 히트싱크 분해  (0) 2025.02.24
Posted by 구차니

tflite 에서 weight만 빼서 거기서 부터 학습 시키면 그게 fine tune / transfer learning(전이학습)이 되는건가?

The conversion from a TensorFlow SaveModel or tf.keras H5 model to .tflite is an irreversible process. Specifically, the original model topology is optimized during the compilation by the TFLite converter, which leads to some loss of information. Also, the original tf.keras model's loss and optimizer configurations are discarded, because those aren't required for inference.

However, the .tflite file still contains some information that can help you restore the original trained model. Most importantly, the weight values are available, although they might be quantized, which could lead to some loss in precision.

The code example below shows you how to read weight values from a .tflite file after it's created from a simple trained tf.keras.Model.



import numpy as np
import tensorflow as tf

# First, create and train a dummy model for demonstration purposes.
model = tf.keras.Sequential([
    tf.keras.layers.Dense(10, input_shape=[5], activation="relu"),
    tf.keras.layers.Dense(1, activation="sigmoid")])
model.compile(loss="binary_crossentropy", optimizer="sgd")

xs = np.ones([8, 5])
ys = np.zeros([8, 1])
model.fit(xs, ys, epochs=1)

# Convert it to a TFLite model file.
converter = tf.lite.TFLiteConverter.from_keras_model(model)
tflite_model = converter.convert()
open("converted.tflite", "wb").write(tflite_model)

# Use `tf.lite.Interpreter` to load the written .tflite back from the file system.
interpreter = tf.lite.Interpreter(model_path="converted.tflite")
all_tensor_details = interpreter.get_tensor_details()
interpreter.allocate_tensors()

for tensor_item in all_tensor_details:
  print("Weight %s:" % tensor_item["name"])
  print(interpreter.tensor(tensor_item["index"])())

[링크 : https://stackoverflow.com/questions/59559289/is-there-any-way-to-convert-a-tensorflow-lite-tflite-file-back-to-a-keras-fil]

 

읽어오든.. tf.keras.application.MobileNetV2 해서 만들던 weight의 유무를 제외하면 동일하게 불러오는건가 보다.

# Create the base model from the pre-trained model MobileNet V2
IMG_SHAPE = IMG_SIZE + (3,)
base_model = tf.keras.applications.MobileNetV2(input_shape=IMG_SHAPE,
                                               include_top=False,
                                               weights='imagenet')
#or load your own
#base_modeltf.saved_model.load("./pretrained_models/ssd_mobilenet_v2_320x320_coco17_tpu-8/saved_model")

[링크 : https://www.aranacorp.com/en/training-a-tensorflow2-model-with-keras/]

 

다시 찾아보니 keras쪽 표현으로

transfer-learning은 기존의 값을 변화시키지 않고 추가 레이어에 학습시키는 것 같고

The typical transfer-learning workflow
This leads us to how a typical transfer learning workflow can be implemented in Keras:

Instantiate a base model and load pre-trained weights into it.
Freeze all layers in the base model by setting trainable = False.
Create a new model on top of the output of one (or several) layers from the base model.
Train your new model on your new dataset.
Note that an alternative, more lightweight workflow could also be:

Instantiate a base model and load pre-trained weights into it.
Run your new dataset through it and record the output of one (or several) layers from the base model. This is called feature extraction.
Use that output as input data for a new, smaller model.


First, instantiate a base model with pre-trained weights.

base_model = keras.applications.Xception(
    weights='imagenet',  # Load weights pre-trained on ImageNet.
    input_shape=(150, 150, 3),
    include_top=False)  # Do not include the ImageNet classifier at the top.
Then, freeze the base model.

base_model.trainable = False


Create a new model on top.

inputs = keras.Input(shape=(150, 150, 3))
# We make sure that the base_model is running in inference mode here,
# by passing `training=False`. This is important for fine-tuning, as you will
# learn in a few paragraphs.
x = base_model(inputs, training=False)
# Convert features of shape `base_model.output_shape[1:]` to vectors
x = keras.layers.GlobalAveragePooling2D()(x)
# A Dense classifier with a single unit (binary classification)
outputs = keras.layers.Dense(1)(x)
model = keras.Model(inputsoutputs)
Train the model on new data.

model.compile(optimizer=keras.optimizers.Adam(),
              loss=keras.losses.BinaryCrossentropy(from_logits=True),
              metrics=[keras.metrics.BinaryAccuracy()])
model.fit(new_dataset, epochs=20, callbacks=..., validation_data=...)

 

fine tuning은 모델 자체의 가중치를 변경시킬수 있도록 해서, 천천히 학습 시키는 것 같다.

Fine-tuning
Once your model has converged on the new data, you can try to unfreeze all or part of the base model and retrain the whole model end-to-end with a very low learning rate.

This is an optional last step that can potentially give you incremental improvements. It could also potentially lead to quick overfitting – keep that in mind.

It is critical to only do this step after the model with frozen layers has been trained to convergence. If you mix randomly-initialized trainable layers with trainable layers that hold pre-trained features, the randomly-initialized layers will cause very large gradient updates during training, which will destroy your pre-trained features.

It's also critical to use a very low learning rate at this stage, because you are training a much larger model than in the first round of training, on a dataset that is typically very small. As a result, you are at risk of overfitting very quickly if you apply large weight updates. Here, you only want to readapt the pretrained weights in an incremental way.


This is how to implement fine-tuning of the whole base model:

# Unfreeze the base model
base_model.trainable = True

# It's important to recompile your model after you make any changes
# to the `trainable` attribute of any inner layer, so that your changes
# are take into account
model.compile(optimizer=keras.optimizers.Adam(1e-5),  # Very low learning rate
              loss=keras.losses.BinaryCrossentropy(from_logits=True),
              metrics=[keras.metrics.BinaryAccuracy()])

# Train end-to-end. Be careful to stop before you overfit!
model.fit(new_dataset, epochs=10, callbacks=..., validation_data=...)

[링크 : https://keras.io/guides/transfer_learning/]

 

 

+

[링크 : https://89douner.tistory.com/270] vgg16 기준 추가학습

 

SavedModel 형식과 비교하여 H5 파일에 포함되지 않은 두 가지가 있습니다.

model.add_loss() 및 model.add_metric()을 통해 추가된 외부 손실 및 메트릭은 저장되지 않습니다(SavedModel과 다름). 모델에 이러한 솔실 및 메트릭이 있고 훈련을 다시 시작하려면 모델을 로드한 후 이러한 손실을 다시 추가해야 합니다. 이는 self.add_loss() 및 self.add_metric()을 통해 레이어 내부에서 생성한 손실/메트릭에는 적용되지 않습니다. 이러한 손실 및 메트릭은 레이어가 로드되는 한 레이어의 call 메서드의 일부이기 때문에 계속 유지됩니다.
사용자 정의 레이어와 같은 사용자 정의 객체의 계산 그래프는 저장 파일에 포함되지 않습니다. 로드 시 Keras는 모델을 다시 구성하기 위해 이러한 객체의 Python 클래스/함수에 액세스해야 합니다. 사용자 정의 객체를 참고하세요.

[링크 : https://www.tensorflow.org/guide/keras/save_and_serialize?hl=ko]

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

keras ssd mobilenet  (0) 2025.09.16
mobilenet 학습시키기 with keras, tensorflow  (0) 2025.09.15
ssd mobilenet  (0) 2025.09.11
LLM 시각화  (0) 2025.09.06
모델 학습  (0) 2025.09.05
Posted by 구차니

요즘은 복리 보기 힘들은데

이자가 쩝..

 

아무튼 이자율이 자꾸 떨어지니 3개월 예금으로는 복리처럼 써먹기 힘들 것 같긴하다

 

2백만원에 2.8% 라고 가정하고 1년 넣으면 세전 56000원 이자

2백만원에 3개월 마자 이자 포함 자동 재예치 하고 2.8% 1년 넣으면 세전 56590원 고작이긴 하지만 590원 더 받는다.

그런데 이자율이 요즘 하락이라

 

3개월뒤 더 떨어진다고 가정하면

그냥 처음 이자 그나마 높을때 묶어 둔게 유리한 상황

 

요즘 시대에(?) 이자가 올라갈 확율이 거의 없으니

목돈 있으면 그냥 예금으로 1년 단위로 묶는게 나을것 같긴한데

야곰야곰 늘어나는 재미도 있으니 머 ㅋㅋ

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

10월의 시작  (0) 2025.10.01
멘탈 크래시 크래시  (0) 2025.09.18
외근  (0) 2025.09.09
압박붕대  (2) 2025.08.25
어우 피곤  (0) 2025.08.05
Posted by 구차니
Linux2025. 9. 17. 11:14

엥....?? 일반권한이랑 root 권한이랑 출력포맷이 다르네?

무슨 dd 한번 썼다고 시스템 크래시 난 줄 -_-

$ cat nvme.log 
$ sudo time dd if=/dev/zero of=test bs=1G count=1 conv=fsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.92836 s, 181 MB/s
0.00user 1.06system 0:06.00elapsed 17%CPU (0avgtext+0avgdata 1051008maxresident)k
0inputs+2097152outputs (0major+262242minor)pagefaults 0swaps

 

time 자체는 하나인데 권한에 따라서 포맷이나 옵션이 다르게 작동하는 것 같다.

$ whereis time
time: /usr/bin/time /usr/share/man/man7/time.7.gz /usr/share/man/man2/time.2.gz /usr/share/man/man3/time.3am.gz /usr/share/man/man3/time.3avr.gz /usr/share/man/man1/time.1.gz /usr/share/info/time.info.gz

 

$ sudo whereis time
time: /usr/bin/time /usr/share/man/man7/time.7.gz /usr/share/man/man2/time.2.gz /usr/share/man/man3/time.3am.gz /usr/share/man/man3/time.3avr.gz /usr/share/man/man1/time.1.gz /usr/share/info/time.info.gz

 

$ ls -al /usr/bin/time
-rwxr-xr-x 1 root root 27160  3월 25  2022 /usr/bin/time

 

일반 유저는 -v를 쓸 수 없는 것 같고

$ time ls

real 0m0.004s
user 0m0.001s
sys 0m0.003s

 

root 에서 -p를 주면 원래 보면 포맷이긴 한데 시간 정밀도가 떨어진다. 왜지?

$ sudo time -p ls
real 0.00
user 0.00
sys 0.00

 

$ sudo time ls
0.00user 0.00system 0:00.00elapsed 66%CPU (0avgtext+0avgdata 2432maxresident)k
0inputs+0outputs (0major+106minor)pagefaults 0swaps

 

$ sudo time -v ls
Command being timed: "ls"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 90%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.00
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2432
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 107
Voluntary context switches: 1
Involuntary context switches: 0
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

 

도움말에 먼가 보이긴 한데..

언제부터 이렇게 바뀐겨? root로 시간 측정할 일이 없으니.. 당황했네

$ man time
FORMATTING THE OUTPUT
       The format string FORMAT controls the contents of the time output.  The
       format string can be set using the `-f' or `--format', `-v' or
       `--verbose', or `-p' or `--portability' options.  If they are not
       given, but the TIME environment variable is set, its value is used as
       the format string.  Otherwise, a built-in default format is used.  The
       default format is:
         %Uuser %Ssystem %Eelapsed %PCPU (%Xtext+%Ddata %Mmax)k
         %Iinputs+%Ooutputs (%Fmajor+%Rminor)pagefaults %Wswaps

'Linux' 카테고리의 다른 글

proc fs smp_affinity  (0) 2025.09.19
dd 로 덤프 하면서 바로 압축하기  (0) 2025.07.24
gpiod - gpiomon  (0) 2025.07.17
scrub  (0) 2025.02.04
Block SCSI generic (bsg) driver  (0) 2024.04.16
Posted by 구차니

3월 17일에

3개월 / 200만원 묶는데 2.8%

 

6월 17일에

3개월 / 200만원 묶는데 2.5%

 

9월 17일에

3개월 / 200만원 묶는데 2.4%

 

장기로 묶는게 유리하려나

'개소리 왈왈 > 정치관련 신세한탄' 카테고리의 다른 글

콜래트럴 데미지  (0) 2025.06.03
전장련 시위 시작  (0) 2025.04.21
보수(保守)는 보수(報酬)를 먹고 자란다  (0) 2025.04.18
윤석열 탄핵  (0) 2025.04.04
제주항공 무안공항 대참사  (0) 2024.12.29
Posted by 구차니
개소리 왈왈/컴퓨터2025. 9. 16. 23:48

역시 잊어야 오는구나 ㅋㅋ

 

+

2025.09.17

nvme 달아서 테스트 해보니 1 lane 이라 181MB/s 정도 밖에 안나온다.

당연하긴 당연한데, 의외로 되니 신기하다.

 

$ cat nvme.log 
$ sudo time dd if=/dev/zero of=test bs=1G count=1 conv=fsync
1+0 records in
1+0 records out
1073741824 bytes (1.1 GB, 1.0 GiB) copied, 5.92836 s, 181 MB/s
0.00user 1.06system 0:06.00elapsed 17%CPU (0avgtext+0avgdata 1051008maxresident)k
0inputs+2097152outputs (0major+262242minor)pagefaults 0swaps

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

abko k1924 적축 키보드 구매  (2) 2025.09.18
알리알리 알라성 알라리 알라 망했네?  (0) 2025.09.18
키보드 수리 2  (0) 2025.09.14
SK-8845RC USB 포트  (0) 2025.09.10
fan error .. 3  (0) 2025.08.10
Posted by 구차니

 

Object Detection with RetinaNet

 

 

[링크 : https://keras.io/examples/vision/retinanet/]

    [링크 : https://www.reddit.com/r/deeplearning/comments/tk5eju/where_can_i_find_an_end_to_end_keras_based_ssd/?tl=ko]

 

MobileNet-SSD300-Keras

Dependencies
Python 2.x or 3.x
Numpy
TensorFlow 1.x
Keras 2.x
OpenCV

[링크 : https://github.com/ManishSoni1908/Mobilenet-ssd-keras]

 

keras + ssd

Dependencies
Python 3.x
Numpy
TensorFlow 1.x
Keras 2.x
OpenCV
Beautiful Soup 4.x

[링크 : https://github.com/pierluigiferrari/ssd_keras]

 

MobileNetV3-SSD 

操作系统: Ubuntu18.04
Python: 3.6
PyTorch: 1.1.0

[링크 : https://github.com/shaoshengsong/MobileNetV3-SSD]

 

'프로그램 사용 > yolo_tensorflow' 카테고리의 다른 글

keras - transfer learning / fine tuning  (0) 2025.09.17
mobilenet 학습시키기 with keras, tensorflow  (0) 2025.09.15
ssd mobilenet  (0) 2025.09.11
LLM 시각화  (0) 2025.09.06
모델 학습  (0) 2025.09.05
Posted by 구차니
embeded/i.mx 8m plus2025. 9. 16. 12:11

오디오와 비디오로 크게 나뉘고

비디오에서는 classification / obejct detection / segmentation 정도가 현재 관심사

sementic segmentation과 instance-segmentation 차이는 멀까?

List of domains
Audio
anomaly detection
command recognition
speech recognition
Vision
classification
face recognition
object detection
pose estimation
semantic segmentation
super resolution
instance-segmentation
low-light enhancement

[링크 : https://github.com/NXP/eiq-model-zoo]

 

텍스트로 넣으니 css 때문에 깨져서 이미지로 복사 -_-

selfie-segmenter는 proprietary dataset이었군..

[링크 : https://github.com/NXP/eiq-model-zoo/tree/main/products]

'embeded > i.mx 8m plus' 카테고리의 다른 글

eiq 데이터 구조  (0) 2025.09.05
ubuntu 22.04 + cuda + cudnn 설치  (0) 2025.09.04
import tensorflow illegal instruction  (0) 2025.09.04
eiq on windows with nvidia  (0) 2025.09.03
vainfo  (0) 2025.09.03
Posted by 구차니