๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ

์ „์ฒด ๊ธ€115

Spring - ์˜ต์…˜์ฒ˜๋ฆฌ ์ฃผ์ž…ํ•  ์Šคํ”„๋ง ๋นˆ์ด ์—†์–ด๋„ ๋™์ž‘ํ•ด์•ผ ํ•  ๋•Œ๊ฐ€ ์žˆ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ @Autowired ๋งŒ ์‚ฌ์šฉํ•˜๋ฉด required ์˜ต์…˜์˜ ๊ธฐ๋ณธ๊ฐ’์ด true ๋กœ ๋˜์–ด ์žˆ์–ด์„œ ์ž๋™ ์ฃผ์ž… ๋Œ€์ƒ์ด ์—†์œผ๋ฉด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค. ์ž๋™ ์ฃผ์ž… ๋Œ€์ƒ์„ ์˜ต์…˜์œผ๋กœ ์ฒ˜๋ฆฌํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ๋‹ค์Œ๊ณผ ๊ฐ™๋‹ค. @Autowired(required=false) : ์ž๋™ ์ฃผ์ž…ํ•  ๋Œ€์ƒ์ด ์—†์œผ๋ฉด ์ˆ˜์ •์ž ๋ฉ”์„œ๋“œ ์ž์ฒด๊ฐ€ ํ˜ธ์ถœ ์•ˆ๋จ org.springframework.lang.@Nullable : ์ž๋™ ์ฃผ์ž…ํ•  ๋Œ€์ƒ์ด ์—†์œผ๋ฉด null์ด ์ž…๋ ฅ๋œ๋‹ค. Optional : ์ž๋™ ์ฃผ์ž…ํ•  ๋Œ€์ƒ์ด ์—†์œผ๋ฉด Optional.empty ๊ฐ€ ์ž…๋ ฅ๋œ๋‹ค. setNoBean1() ์€ @Autowired(required=false) ์ด๋ฏ€๋กœ ํ˜ธ์ถœ ์ž์ฒด๊ฐ€ ์•ˆ๋œ๋‹ค. ์ฐธ๊ณ : @Nullable, Optional์€ ์Šค.. 2023. 7. 14.
Spring - ๋‹ค์–‘ํ•œ ์˜์กด๊ด€๊ณ„ ์ฃผ์ž… ๋ฐฉ๋ฒ• 1. ์ƒ์„ฑ์ž ์ฃผ์ž… ์ด๋ฆ„ ๊ทธ๋Œ€๋กœ ์ƒ์„ฑ์ž๋ฅผ ํ†ตํ•ด์„œ ์˜์กด ๊ด€๊ณ„๋ฅผ ์ฃผ์ž… ๋ฐ›๋Š” ๋ฐฉ๋ฒ• ํŠน์ง• ์ƒ์„ฑ์ž ํ˜ธ์ถœ์‹œ์ ์— ๋”ฑ 1๋ฒˆ๋งŒ ํ˜ธ์ถœ๋˜๋Š” ๊ฒƒ์ด ๋ณด์žฅ๋œ๋‹ค. ๋ถˆ๋ณ€, ํ•„์ˆ˜ ์˜์กด๊ด€๊ณ„์— ์‚ฌ์šฉ @Component public class OrderServiceImpl implements OrderService { private final MemberRepository memberRepository; private final DiscountPolicy discountPolicy; @Autowired public OrderServiceImpl(MemberRepository memberRepository, DiscountPolicy discountPolicy) { this.memberRepository = memberRepository; t.. 2023. 7. 12.
Stable Diffusion Stable Diffusion์ด๋ž€? DALL-E2 ๋ฐ Imagen์™€ ๋น„์Šทํ•œ ๊ฒฐ์˜ ์ƒˆ๋กœ์šด ๋”ฅ๋Ÿฌ๋‹ ๋ชจ๋ธ์ด๋‹ค. ํ…์ŠคํŠธ - ์ด๋ฏธ์ง€ ์˜์—ญ์—์„œ ๋‘๊ฐ์„ ๋‚˜ํƒ€๋‚ธ๋‹ค. ์†Œ๋น„์ž๊ธ‰ GPU์—์„œ ์‹คํ–‰ ํ•  ์ˆ˜ ์žˆ์„๋งŒํผ ์ถฉ๋ถ„ํžˆ ํšจ์œจ์ ์ด๋‹ค. ์ง€๊ธˆ ๋ฐ”๋กœ ๋ช‡๊ฐœ์˜ ๋‹จ์–ด์™€ ๋ช‡๋ถ„์˜ ์‹œ๊ฐ„์œผ๋กœ ์•„๋ž˜์™€ ๊ฐ™์€ ์ด๋ฏธ์ง€๋ฅผ ์ƒ์„ฑํ•  ์ˆ˜ ์žˆ๋‹ค. stable Diffusion์€ ์–ด๋–ป๊ฒŒ ์ž‘๋™ํ•˜๋Š”๊ฐ€? https://www.assemblyai.com/blog/how-physics-advanced-generative-ai/#generative-ai-with-thermodynamics ์ฐธ๊ณ ์ž๋ฃŒ https://velog.io/@hewas1230/StableDiffusion https://pitas.tistory.com/9 https://github.com/CompVis/.. 2023. 7. 11.
Generative Model 1์„ธ๋Œ€ Autoencoder(AE) ์ฃผ์–ด์ง„ ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋กœ๋ถ€ํ„ฐ ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋Šฅ๋ ฅ์„ ๊ฐ–์ถ˜ ๋ชจ๋ธ AE๋Š” ์ฃผ๋กœ ๋น„์ง€๋„ ํ•™์Šต ๋ฐฉ์‹์œผ๋กœ ์‚ฌ์šฉ๋˜๋ฉฐ, ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋ฅผ ์ž ์žฌ ํ‘œํ˜„(latent representation)์œผ๋กœ ์••์ถ•ํ•œ ํ›„ ์ด๋ฅผ ๋‹ค์‹œ ๋ณต์›ํ•˜์—ฌ ์ž…๋ ฅ ๋ฐ์ดํ„ฐ์™€ ์œ ์‚ฌํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑ Generative model 1์„ธ๋Œ€ AE๋Š” ๊ธฐ๋ณธ์ ์œผ๋กœ ์ธ์ฝ”๋”(encoder)์™€ ๋””์ฝ”๋”(decoder)๋ผ๋Š” ๋‘ ๋ถ€๋ถ„์œผ๋กœ ๊ตฌ์„ฑ ์ธ์ฝ”๋”(encoder): ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์ฐจ์›์˜ ์ž ์žฌ ํ‘œํ˜„์œผ๋กœ ๋ณ€ํ™˜ํ•ฉ๋‹ˆ๋‹ค. ์ด ์ž ์žฌ ํ‘œํ˜„์€ ์ผ๋ฐ˜์ ์œผ๋กœ ์ €์ฐจ์›์˜ ๋ฐ€์ง‘ ๋ฒกํ„ฐ์ž…๋‹ˆ๋‹ค. ์ธ์ฝ”๋”๋Š” ์ž…๋ ฅ ๋ฐ์ดํ„ฐ๋ฅผ ์ €์ฐจ์› ๊ณต๊ฐ„์œผ๋กœ ์••์ถ•ํ•˜๋Š” ๋ฐฉ์‹์œผ๋กœ ํ•™์Šต๋ฉ๋‹ˆ๋‹ค. ๋””์ฝ”๋”(decoder): ์ž ์žฌ ํ‘œํ˜„์„ ์›๋ž˜์˜ ๋ฐ์ดํ„ฐ ๊ณต๊ฐ„์œผ๋กœ ๋ณต์›ํ•˜์—ฌ ์ƒˆ๋กœ์šด ๋ฐ์ดํ„ฐ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค. ๋””์ฝ”๋”.. 2023. 7. 11.